Skip to main content

Content Manager FileManager for jupyterhub with hooks.

Project description

Content Manager for Filemanager Jupyterhub with hooks support

Install

pip install jupyterhub_hook_filemanager

In your jupyterhub config file:

from jupyterhub_hook_filemanager.hook_filemanager import HookFileContentsManager

c.NotebookApp.contents_manager_class = HookFileContentsManager
c.HookFileContentsManager.pre_get_hook = your_function
c.HookFileContentsManager.post_get_hook = your_function

your_function should expect an user_object with attributes name for user login and hook_name with hook called.

So in your function:

your_function(path, content, type, format, contents_manager):
    send_info(contents_manager.user.name, path)
c.HookFileContentsManager.pre_update_hook = your_function
c.HookFileContentsManager.post_update_hook = your_function

your_function should expect an user_object with attributes name for user login and hook_name with hook called.

So in your function:

your_function(model, path, contents_manager):
    send_info(contents_manager.user.name, path, model)
c.HookFileContentsManager.pre_delete_hook = your_function
c.HookFileContentsManager.post_delete_hook = your_function

your_function should expect an user_object with attributes name for user login and hook_name with hook called.

So in your function:

your_function(path, contents_manager):
    send_info(contents_manager.user.name, path)

pre_save_hook and post_save_hook are specified at default documentation: http://jupyter-notebook.readthedocs.io/en/latest/extending/savehooks.html

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyterhub_hook_filemanager-0.0.2.tar.gz (3.9 kB view details)

Uploaded Source

File details

Details for the file jupyterhub_hook_filemanager-0.0.2.tar.gz.

File metadata

File hashes

Hashes for jupyterhub_hook_filemanager-0.0.2.tar.gz
Algorithm Hash digest
SHA256 a6103a77d495d0b6aedd596e00aae1682fc53adfc9333e8460184f6743aca9b4
MD5 00125e312842f90b311d141a41c68588
BLAKE2b-256 de3097c31da4757dc913e7adb9442779b9344a1351a4dbb553680a450606a679

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page