Skip to main content

Run jupyter notebooks as command line scripts with variable overrides

Project description

Run jupyter notebooks as command line scripts with variable overrides

For making variables overridable, wrap them using jin as shown below

from jrun import jin

# First parameter is identifier, second is default value
seed = jin("seed", 1234)
speed = jin("speed", 45)
trial_number = jin("tno", 1)

# Other code

Running the notebook directly (jrun notebook.ipynb) will use the default parameter values. To override any of them, pass another argument to jrun specifying the override in plain python like jrun notebook.ipynb "tno = 2; seed = 2313".

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

jrun-0.1.1.tar.gz (15.1 kB view details)

Uploaded Source

File details

Details for the file jrun-0.1.1.tar.gz.

File metadata

  • Download URL: jrun-0.1.1.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for jrun-0.1.1.tar.gz
Algorithm Hash digest
SHA256 88a195ea59c052971bc4291bd5c5c230456775f081a5973892519f47a97b68ce
MD5 093385db6748add350f835c53f09a18c
BLAKE2b-256 a830d4c5a2249f2712bfc7b88907a76fbb95a7ef43395b272f1b8b0f35058a42

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