Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

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".

Release History

This version
History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(15.1 kB) Copy SHA256 Hash SHA256
Source Aug 22, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting