A Postgres-backed ContentsManager implementation for Jupyter
PGContents is a PostgreSQL-backed implementation of
IPEP 27_. It aims to a be a transparent, drop-in replacement for IPython's standard filesystem-backed storage system. PGContents'
PostgresContentsManagerclass can be used to replace all local filesystem storage with database-backed storage, while its
PostgresCheckpointsclass can be used to replace just IPython's checkpoint storage. These features are useful when running IPython in environments where you either don't have access to—or don't trust the reliability of—the local filesystem of your notebook server.
This repository developed as part of the
Quantopian Research Environment_.
Prerequisites: - Write access to an empty
PostgreSQL_ database. - A Python installation with
Jupyter Notebook_ >= 5.0.
pgcontentsfrom PyPI via
pip install pgcontents.
pgcontents initto configure your database. You will be prompted for a database URL for pgcontents to use for storage. (Alternatively, you can set the
PGCONTENTS_DB_URLenvironment variable, or pass
--db-urlon the command line).
~/.jupyter/jupyter_notebook_config.py. See the
examplesdirectory for example configuration files.
You can see a demo of PGContents in action in
this presentation from JupyterCon 2017_.
this presentation from JupyterCon 2017: https://youtu.be/TtsbspKHJGo?t=917