Skip to main content

A description of your project

Project description

execnb

CI Deploy to GitHub Pages

Install

Either:

pip install execnb

or if you use conda:

conda install -c fastai execnb

(You can replace conda with mamba in the line above if you have mamba installed.)

How to use

Use CaptureShell to run Jupyter code and capture notebook outputs, without running a Jupyter server (or even having it installed):

s = CaptureShell()
s.run('1+1')
[{'data': {'text/plain': ['2']},
  'metadata': {},
  'output_type': 'execute_result',
  'execution_count': 1}]

To execute a notebook and save it with outputs filled in, use execute:

try:
    s.execute('../tests/clean.ipynb', 'tmp.ipynb')
    print(read_nb('tmp.ipynb').cells[1].outputs)
finally: Path('tmp.ipynb').unlink()
[{'data': {'text/plain': ['2']}, 'execution_count': 6, 'metadata': {}, 'output_type': 'execute_result'}, {'name': 'stdout', 'output_type': 'stream', 'text': ['1']}]

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

execnb-0.0.5.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

execnb-0.0.5-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file execnb-0.0.5.tar.gz.

File metadata

  • Download URL: execnb-0.0.5.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.10

File hashes

Hashes for execnb-0.0.5.tar.gz
Algorithm Hash digest
SHA256 a52188dc9ffcc9fc6d9b2eeeda30c486663a145d2b89307fd7b03340b2702d6a
MD5 f1148867ef7d6c345040f3ce402e8ab9
BLAKE2b-256 c6082286c0a5b073d4c37e8348a485f29ac46883d7c3e133a9107bac77bd6853

See more details on using hashes here.

File details

Details for the file execnb-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: execnb-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.10

File hashes

Hashes for execnb-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 55ef4fced5ba075ab2a7c03b0d33b87e3f80ed3403d0573af3a02bd52a23a62f
MD5 d0ab6727ac993af2cdc8b9ce479ceea5
BLAKE2b-256 0fa27546301af0d66280c7239b50c2ac5824b232929a43c3408f1b639dc16457

See more details on using hashes here.

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