Skip to main content

Extension for IPython/Jupyter Notebooks that adds namespaces that you can enter and re-enter

Project description

IPython Namespaces

Extension for IPython/Jupyter Notebooks that adds namespaces that you can enter and re-enter.

(Because: “Namespaces are one honking great idea – let’s do more of those!”)

Usage (in a Jupyter Notebook)

Install and load the extension:

!pip install -U ipython-namespaces
%load_ext ipython_namespaces

Use the space cell magic:

foo = 23
%%space dustin

bar = 42
foo, bar

Output: (23, 42)

foo, bar

Output: NameError: name 'bar' is not defined

%%space dustin

foo, bar

Output: (23, 42)

from ipython_namespaces import Namespaces

Namespaces.dustin['bar']

Output: 42

Features

  1. Separate namespaces within one Jupyter Notebook
  2. Access to other namespaces via the Namespaces class
  3. Unchanged behavior of display – the value of the last line in a cell is displayed
  4. Unchanged behavior of tracebacks – the problematic line in one’s own code is highlighted

Acknowledgements

Thanks to Davide Sarra and the Jupyter Spaces extension for the inspiration!

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

ipython-namespaces-0.1.3.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ipython_namespaces-0.1.3-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file ipython-namespaces-0.1.3.tar.gz.

File metadata

  • Download URL: ipython-namespaces-0.1.3.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.16 CPython/3.7.1 Linux/4.4.0-128-generic

File hashes

Hashes for ipython-namespaces-0.1.3.tar.gz
Algorithm Hash digest
SHA256 de72a6fec64634cbadfc121ccc281d75bfdc24f7dce38733071cd449595af162
MD5 305541c399404bd81e9678bc434bdfaf
BLAKE2b-256 574b8a747c2b8413ee68a9ef66d58f189c6b898c9e654595326fcd9215874d35

See more details on using hashes here.

File details

Details for the file ipython_namespaces-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: ipython_namespaces-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.16 CPython/3.7.1 Linux/4.4.0-128-generic

File hashes

Hashes for ipython_namespaces-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d2bfe6d0ce999f135b74be009c9d56408cdccd95bd5b83ce96fa4adfa1b7d72b
MD5 af3ab70bd435217f240e06a7a4b595fe
BLAKE2b-256 f454fcc62d049f25392bdfcef5a30eea37dee442647cc0b77ed65756012142d2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page