Configuration

Bookstore may be configured by providing BookstoreSettings in the ~/.jupyter/jupyter_notebook_config.py file.

The bookstore_config module

BookstoreSettings

These settings are configurable by the user. Bookstore uses the traitlets library to handle the configurable options.

class bookstore.bookstore_config.BookstoreSettings(**kwargs)

Configuration for archival and publishing.

Settings include storage directory locations, S3 authentication, additional S3 settings, and Bookstore resources.

S3 authentication settings can be set, or they can be left unset when IAM is used.

Like the Jupyter notebook, bookstore uses traitlets to handle configuration, loading from files or CLI.

workspace_prefix

Directory to use for user workspace storage

Type:str(workspace)
published_prefix

Directory to use for published notebook storage

Type:str(published)
s3_access_key_id

Environment variable JPYNB_S3_ACCESS_KEY_ID

Type:str, optional
s3_secret_access_key

Environment variable JPYNB_S3_SECRET_ACCESS_KEY

Type:str, optional
s3_endpoint_url

Environment variable JPYNB_S3_ENDPOINT_URL

Type:str("https://s3.amazonaws.com")
s3_region_name

Environment variable JPYNB_S3_REGION_NAME

Type:str("us-east-1")
s3_bucket

Bucket name, environment variable JPYNB_S3_BUCKET

Type:str("")
max_threads

Maximum threads from the threadpool available for S3 read/writes

Type:int(16)
enable_s3_cloning

Enable cloning from s3.

Type:bool(True)
fs_cloning_basedir

Absolute path to base directory used to clone from the local file system

Type:str("/Users/jupyter")

Functions

These functions will generally be used by developers of the bookstore application.

bookstore.bookstore_config.validate_bookstore(settings: bookstore.bookstore_config.BookstoreSettings)

Check that settings exist.

Parameters:settings (bookstore.bookstore_config.BookstoreSettings) – Instantiated settings object to be validated.
Returns:validation_checks – Statements about whether features are validly configured and available
Return type:dict