Egor Bulychev, source{d}
Egor Bulychev, source{d}
. ├── foo/bar/image.png └── foo/text.txt
. └── foo ├── bar │ └── img.png └── text.txt
google └── cloud └── storage └── Client ├── create_bucket ├── get_bucket └── list_buckets
google └── cloud └── storage └── Bucket ├── blob ├── copy_blob ├── delete ├── delete_blobs ├── get_blob ├── list_blobs └── rename_blob
google └── cloud └── storage └── Blob ├── content_type ├── download_as_string ├── exist ├── updated └── upload_from_string
notebook └── services └── contents └── manager └── ContentsManager ├── delete_file ├── dir_exists ├── file_exists ├── get ├── is_hidden ├── rename_file └── save
notebook └── services └── contents └── checkpoints └── Checkpoints ├── create_checkpoint ├── delete_checkpoint ├── list_checkpoints └── rename_checkpoint
notebook └── services └── contents └── checkpoints └── GenericCheckpointsMixin ├── create_file_checkpoint ├── create_notebook_checkpoint ├── get_file_checkpoint └── get_notebook_checkpoint
model = { "name": None, "path": None, "type": None, "created": None, "last_modified": None, "content": None, "format": None, "mimetype": None }
model["type"] = "file" model["mimetype"] = "text/plain"/"application/octet-stream" model["format"] = "text" or "base64" model["content"] = content
model["type"] = "notebook" model["mimetype"] = "application/x-ipynb+json" model["format"] = "json" model["content"] = content of notebook
model["type"] = "directory" model["mimetype"] = "application/x-directory" model["format"] = "json" model["content"] = list(content-free-models of files/nb/dirs)
gcloud init
:
~/.jupyter/jupyter_notebook_config.py
c.NotebookApp.contents_manager_class = "jgscm.GoogleStorageContentManager"
c.GoogleStorageContentManager.project = "project"
c.GoogleStorageContentManager.keyfile = "/path/to/keyfile.json"
c.GoogleStorageContentManager.default_path = "path/without/starting/slash"
c.Application.log_level = "DEBUG"
c.GoogleStorageContentManager.cache_buckets = True
c.GoogleStorageContentManager.max_list_size = 128