Skip to main content

A Postgres-backed ContentsManager for IPython/Jupyter.

Project description

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’ PostgresContentsManager class can be used to replace all local filesystem storage with database-backed storage, while its PostgresCheckpoints class 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 is under development as part of the Quantopian Research Environment, currently in Open Beta.

Getting Started

Prerequisites:

Installation:

  1. Install pgcontents from PyPI via pip install pgcontents[ipy4]. (This will install pgcontents in a manner compatible with a recent Jupyter Notebook version. To install pgcontents with support for the legacy IPython 3.x series, run pip install pgcontents[ipy3]).

  2. Run pgcontents init to configure your database. You will be prompted for a database URL for pgcontents to use for storage. (Alternatively, you can set the PGCONTENTS_DB_URL environment variable, or pass –db-url on the command line).

  3. Configure IPython/Jupyter to use pgcontents as its storage backend. This can be done from the command line or by modifying your notebook config file. For IPython 3.x on a Unix-like system, your notebok config will be located located at ~/.ipython/profile_default/ipython_notebook_config.py. For Jupyter Notebook, it will will be located at ~/.jupyter/jupyter_notebook_config.py. See the examples directory for example configuration files.

  4. Enjoy your filesystem-free IPython experience!

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

pgcontents-0.5.2.tar.gz (41.6 kB view details)

Uploaded Source

File details

Details for the file pgcontents-0.5.2.tar.gz.

File metadata

  • Download URL: pgcontents-0.5.2.tar.gz
  • Upload date:
  • Size: 41.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pgcontents-0.5.2.tar.gz
Algorithm Hash digest
SHA256 0749be3c7f8dbb24b2d64bdfa9d5e94483a1faf1c39a06c67a514df5c1913dcf
MD5 538425b719c3258da91e66605d3f0626
BLAKE2b-256 d040fb3d4fedb3b75e6f12716baa4882f2c6fd37b68e6dee1777b887e6c8b1f2

See more details on using hashes here.

Provenance

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