Jupyter Notebook PyFilesystem 内容管理器
项目描述
Jupyter Notebook PyFilesystem 内容管理器
一个Jupyter Notebooks ContentsManager
,它使用PyFilesystem来存储文件。包括一个兼容的Checkpoints
类。
安装
pip install jupyter-pyfilesystem
示例
jupyter_notebook_config.py
:
c.NotebookApp.contents_manager_class = 'jupyter_pyfilesystem.FsContentsManager'
# In-memory temporary filesystem
c.FsContentsManager.fs_url = 'mem://'
有关如何定义fs_url
的信息,请参阅https://docs.pyfilesystem.org/en/latest/openers.html,有关内置文件系统的列表,请参阅https://docs.pyfilesystem.org/en/latest/builtin.html。还有一些外部贡献的文件系统可供使用。其中一些列在https://www.pyfilesystem.org/page/index-of-filesystems/
注意,某些文件系统可能不会按预期运行。例如,当前对zip://
和tar://
文件系统的实现不允许您更新现有文件。您只能创建/覆盖现有文件或以只读方式打开文件。
例如
c.FsContentsManager.fs_url = 'zip:///tmp/test.zip'
import os
if os.path.exists(fs_url[6:]):
c.FsContentsManager.create = False
c.FsContentsManager.writeable = False
如果您正在使用远程文件系统,您可能想启用keepalive
。例如,这将每60秒远程请求获取/
的详细信息
c.FsContentsManager.keepalive = 60
致谢
此存储库基于https://github.com/quantopian/pgcontents/tree/5fad3f6840d82e6acde97f8e3abe835765fa824b
项目详情
下载文件
下载适用于您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。
源代码分发
jupyter-pyfilesystem-0.0.5.tar.gz (12.1 kB 查看哈希值)
构建分发
关闭
jupyter-pyfilesystem-0.0.5.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 0ad38ea74e4ca6a4ed46044f0431c1557e1232863f1dd73397cfe100202f4bae |
|
MD5 | 03ef73fdfb01f5ceb978bb3711741e53 |
|
BLAKE2b-256 | 36250a431a4eea9b5c36718b40be9cedd1518bff3efb09bd9c136fb4b78f50dc |
关闭
jupyter_pyfilesystem-0.0.5-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 703c5d019474f3bd05ec038ce5e6f197160f3874ff0af93d7228c4fe2753266f |
|
MD5 | 43dcd9a29be1035280470dbc5c8f1396 |
|
BLAKE2b-256 | d39a2c3b765e26d624288abee9a6f22431efbd23d27ebae73545f547b01f8731 |