mirror of
https://github.com/jupyter/notebook.git
synced 2025-04-18 14:10:26 +08:00
Document contents chunks (#5508)
* Document contents chunks Add a documentation entry for the contents API regarding use of "chunk" in save. Adds an `extra_requires` value in setup.py for installing documentation dependencies.
This commit is contained in:
parent
a2a3b9cbff
commit
7bf9b5ec68
@ -200,6 +200,25 @@ You may be required to specify a Checkpoints object, as the default one,
|
||||
``FileCheckpoints``, could be incompatible with your custom
|
||||
ContentsManager.
|
||||
|
||||
|
||||
Chunked Saving
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
The contents API allows for "chunked" saving of files, i.e.
|
||||
saving/transmitting in partial pieces:
|
||||
|
||||
* This can only be used when the ``type`` of the model is ``file``.
|
||||
* The model should be as otherwise expected for
|
||||
:meth:`~manager.ContentsManager.save`, with an added field ``chunk``.
|
||||
* The value of ``chunk`` should be an integer starting at ``1``, and incrementing
|
||||
for each subsequent chunk, except for the final chunk, which should be
|
||||
indicated with a value of ``-1``.
|
||||
* The model returned from using :meth:`~manager.ContentsManager.save` with
|
||||
``chunk`` should be treated as unreliable for all chunks except the final one.
|
||||
* Any interaction with a file being saved in a chunked manner is unreliable
|
||||
until the final chunk has been saved. This includes directory listings.
|
||||
|
||||
|
||||
Customizing Checkpoints
|
||||
-----------------------
|
||||
.. currentmodule:: notebook.services.contents.checkpoints
|
||||
|
1
setup.py
1
setup.py
@ -117,6 +117,7 @@ for more information.
|
||||
'test': ['nose', 'coverage', 'requests', 'nose_warnings_filters',
|
||||
'nbval', 'nose-exclude', 'selenium', 'pytest', 'pytest-cov',
|
||||
'requests-unixsocket'],
|
||||
'docs': ['sphinx', 'nbsphinx', 'sphinxcontrib_github_alt'],
|
||||
'test:sys_platform == "win32"': ['nose-exclude'],
|
||||
},
|
||||
python_requires = '>=3.5',
|
||||
|
Loading…
x
Reference in New Issue
Block a user