Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7bf9b5e

Browse files
authored
Document contents chunks (#5508)
* Document contents chunksAdd 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.
1 parenta2a3b9c commit7bf9b5e

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

‎docs/source/extending/contents.rst‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,25 @@ You may be required to specify a Checkpoints object, as the default one,
200200
``FileCheckpoints``, could be incompatible with your custom
201201
ContentsManager.
202202

203+
204+
Chunked Saving
205+
~~~~~~~~~~~~~~
206+
207+
The contents API allows for "chunked" saving of files, i.e.
208+
saving/transmitting in partial pieces:
209+
210+
* This can only be used when the ``type`` of the model is ``file``.
211+
* The model should be as otherwise expected for
212+
:meth:`~manager.ContentsManager.save`, with an added field ``chunk``.
213+
* The value of ``chunk`` should be an integer starting at ``1``, and incrementing
214+
for each subsequent chunk, except for the final chunk, which should be
215+
indicated with a value of ``-1``.
216+
* The model returned from using:meth:`~manager.ContentsManager.save` with
217+
``chunk`` should be treated as unreliable for all chunks except the final one.
218+
* Any interaction with a file being saved in a chunked manner is unreliable
219+
until the final chunk has been saved. This includes directory listings.
220+
221+
203222
Customizing Checkpoints
204223
-----------------------
205224
..currentmodule::notebook.services.contents.checkpoints

‎setup.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
'test': ['nose','coverage','requests','nose_warnings_filters',
118118
'nbval','nose-exclude','selenium','pytest','pytest-cov',
119119
'requests-unixsocket'],
120+
'docs': ['sphinx','nbsphinx','sphinxcontrib_github_alt'],
120121
'test:sys_platform == "win32"': ['nose-exclude'],
121122
},
122123
python_requires='>=3.5',

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp