callisto
A jupyter notebook viewer that has the following features:
- Use ContentsManager as content provider. Therefore it is completely work with any of your jupyterhub settings.
- Showing Table of Contents for quickly reference to your notebook
- Directly import the notebook to your jupyterhub server.
Getting Started
- Install the package:
pip install callisto-nbviewer
- start the server:
callisto start --port 5000
- Visit website
localhost:5000
Configuration
You can use your own config to customize callisto. see example on tests/fixtures/config.py
ontents_manager_cls = "s3contents.S3ContentsManager"
# `contents_manager_cls` can be string or ContentsManger class
# You can use any existing ContentsManager to load data.
# If the value is not set, the default would be FileContentsManager
# and will serve contents on current working directory
contents_manager_kwargs = {
"bucket": "test-bucket",
"access_key_id": "testing",
"secret_access_key": "testing",
"endpoint_url": "http://localhost:3000"
}
# [Optional] `contents_manager_kwargs` is a dict of kwargs to configure the required settings
# for whatever ContentsManager you choose.
jupyterhub_base_url = "https://jupyterhub.example.com"
# [Optional] `jupyterhub_base_url` if set, you can import the notebook directly to your jupyterhub server
# This is the base url to your jupyterhub.
import_link_with_hubshare_preview = True
# [Optional] `import_link_with_hubshare_preview`: if you have installed jupyterlab-hubshare plugin,
# You can use this link to show preview on your notebook server
import_link_func = lambda path: "prefix/" + path
# [Optional] `import_link_func` is a function in that takes the current path as an input,
# You can do any magic to update the final path in case the path on the site is different
# from the path on jupyterhub.
and then start callisto with
callisto --config my_callisto_config.py
Config for different contents manager
Local File
contents_manager_cls = "managerjupyter_server.services.contents.filemanager.FileContentsManager"
contents_manager_kwargs = {"root_dir": "/absolute/path/to/your/notebook/folder"}
S3
Note that s3contents seems to be fetching the directory last_modified time, and is very slow.
Therefore I make a work around file in callisto.contents_managers.s3.SimplifiedS3ContentsManager class
please take a look on the settings.
contents_manager_cls = "callisto.contents_managers.s3.SimplifiedS3ContentsManager"
contents_manager_kwargs = {
"bucket": "my-s3-bucket",
"prefix": "prefix/to/your/notebook/folder",
"aws_access_key_id": "my_access_key",
"aws_secret_access_key": "my_secret_access_key",
}
if your file s3 doesn't contains a lot of folders, you can still use s3contents (please ensure you also install s3contents)
contents_manager_cls = "s3contents.S3ContentsManager"
contents_manager_kwargs = {
"bucket": "my-s3-bucket",
"prefix": "prefix/to/your/notebook/folder",
}
for more settings, please refer to: s3contents
Development
to start a dev version, download the git repo:
git clone https://github.com/lydian/callisto.git
and run
cd callisto
make start-dev
The dev server will running on http://localhost:5001
Metadata
Release files for callisto-nbviewer 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| callisto-nbviewer-1.0.2.tar.gz | 1.7 MB | Without provenance | Details for callisto-nbviewer-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| callisto_nbviewer-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for callisto_nbviewer-1.0.2-py3-none-any.whl |
Total release size: 3.4 MB
Release files / callisto-nbviewer-1.0.2.tar.gz
| Download URL | callisto-nbviewer-1.0.2.tar.gz |
|---|---|
| Size | 1.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d6864594debdb141c4c2db907480b086b34e3609a6c50ec0c8e7b08bb123e181
|
|
BLAKE2b-256 checksum How to use checksums |
81c505a55399e29b040bfb9c999c2b168fbe56b449393bc9ddb6e31a4af7e289
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / callisto_nbviewer-1.0.2-py3-none-any.whl
| Download URL | callisto_nbviewer-1.0.2-py3-none-any.whl |
|---|---|
| Size | 1.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
625cd6aafbb945b6414e6136fdc484badae54e24fa2d9eea6b0adcfd77ea7630
|
|
BLAKE2b-256 checksum How to use checksums |
d4d803a685744bf5c5096a56771ca67c4cfae29f9d6d9dcea730354eb56d5e80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Security for callisto-nbviewer 1.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.