[IPython-dev] Mime type for IPython notebooks

MinRK benjaminrk at gmail.com
Thu Aug 14 15:48:56 EDT 2014


On Thu, Aug 14, 2014 at 11:55 AM, Doug Blank <doug.blank at gmail.com> wrote:

On Thu, Aug 14, 2014 at 2:20 PM, Thomas Kluyver <takowl at gmail.com> wrote:
>
>> In the dev meeting, we discussed what the mime type should be for IPython
>> notebook files. The people in the meeting preferred
>> *application/x-ipynb+json* (we also considered
>> application/x-jupyter-notebook+json, and both of those without the +json
>> suffix). Looking at the official mime type registry [1], +json and +xml are
>> common suffixes to indicate container formats.
>>
>> Does anyone want to argue for a different mime type before we declare
>> application/x-ipynb+json the victor?
>>
>
> Before you  wrote this, I would have guessed that the filename extensions
> on notebooks would probably be changed to something more generic. Thinking
> that you are going to also attach those 5 letters to the mime-type makes me
> wonder. So, let me make a couple of points, and try to sway y'all in a more
> generic naming scheme.
>
We wouldn’t have picked .ipynb if we were choosing now, but the cost of
changing one letter seems to significantly outweigh the benefits. For a
slightly facetious argument: In Latin, there is no distinction between I
and J, so technically the name would be IUPYTER, so a .ipynb extension
still makes sense for project iupyter :)


> An aside, I think you could leave the +json off. The container indication
> is useful on svg+xml to remind people that it is an image, and also xml.
> Thus, many browsers can handle it directly. I don't think it makes sense on
> a general format, unless you are considering adding application/...+xml (or
> some other container format) at some point, too. Knowing that a format is
> json doesn't get you much.
>
It doesn’t get you much, but we found a number of examples following the
convention on the IANA registry
<http://www.iana.org/assignments/media-types/media-types.xhtml>, and it
seems helpful to note that it is indeed plain JSON, and the notebook just
describes the *structure* of that JSON.


> Jupyter will soon be the name that represents the big picture. Why
> wouldn't the mime-type also represent the big picture? Also, there isn't
> any other Jupyter file format, so why not just make it
> application/x-jupyter ? As for file extension, consider the big picture,
> too. Maybe: .jnb, .jup, or even .jupyter.
>
I think we would keep notebook as part of it, so honestly the most likely
candidate is .jpynb, which is almost identical to the existing .ipynb.
There could easily be other non-notebook Jupyter-related files in the
future.


> Anyway, thanks for asking for arguments; always willing to oblige :)
>
Thanks!

-MinRK


> -Doug
>
>
>>
>> 1 http://www.iana.org/form/media-types
>>
>> Thanks,
>> Thomas
>>
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>
>>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140814/3293e993/attachment.html>


More information about the IPython-dev mailing list