Skip to main content

JupyterHub Hook FileManager

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

Metadata

Release files for jupyterhub_hook_filemanager 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jupyterhub_hook_filemanager 0.0.2
File Size Uploaded Provenance Actions
jupyterhub_hook_filemanager-0.0.2.tar.gz 3.9 kB Without provenance Details for jupyterhub_hook_filemanager-0.0.2.tar.gz

Release files / jupyterhub_hook_filemanager-0.0.2.tar.gz

Download URL jupyterhub_hook_filemanager-0.0.2.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a6103a77d495d0b6aedd596e00aae1682fc53adfc9333e8460184f6743aca9b4
BLAKE2b-256 checksum
How to use checksums
de3097c31da4757dc913e7adb9442779b9344a1351a4dbb553680a450606a679
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for jupyterhub_hook_filemanager 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file No provenance

0.0.1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page