{"id":15805283,"url":"https://github.com/lsys/runpynb","last_synced_at":"2025-09-03T23:37:45.522Z","repository":{"id":52111769,"uuid":"520408889","full_name":"LSYS/runPyNB","owner":"LSYS","description":"Run Jupyter notebooks in command-line and Makefiles.","archived":false,"fork":false,"pushed_at":"2024-05-01T03:12:08.000Z","size":352,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-24T01:36:08.531Z","etag":null,"topics":["cli","jupyter","jupyter-notebook","makefile","notebook-jupyter","python"],"latest_commit_sha":null,"homepage":"https://runpynb.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LSYS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-08-02T08:10:32.000Z","updated_at":"2025-07-17T11:26:01.000Z","dependencies_parsed_at":"2024-05-01T03:39:07.399Z","dependency_job_id":"858e9b07-d68b-443d-b074-e5b8cad686d0","html_url":"https://github.com/LSYS/runPyNB","commit_stats":{"total_commits":56,"total_committers":1,"mean_commits":56.0,"dds":0.0,"last_synced_commit":"9a270695bda1f5444eba43b2b0e0158fb4135c02"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/LSYS/runPyNB","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LSYS%2FrunPyNB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LSYS%2FrunPyNB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LSYS%2FrunPyNB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LSYS%2FrunPyNB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LSYS","download_url":"https://codeload.github.com/LSYS/runPyNB/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LSYS%2FrunPyNB/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273528824,"owners_count":25121821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","jupyter","jupyter-notebook","makefile","notebook-jupyter","python"],"created_at":"2024-10-05T02:07:13.567Z","updated_at":"2025-09-03T23:37:45.499Z","avatar_url":"https://github.com/LSYS.png","language":"Python","readme":"\u003cdiv id=\"top\"\u003e\u003c/div\u003e \n\n# Run Jupyter notebooks quietly from command-line\n[![PyPI](https://img.shields.io/pypi/v/runpynb?color=brightgreen\u0026label=PyPI)](https://pypi.org/project/runpynb/)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/lsys/runpynb?label=Latest%20release)\n\u003cbr\u003e\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/runpynb?label=Python%203.6%2B)](https://pypi.org/project/runpynb/)\n\u003cbr\u003e\n[![DOI](https://zenodo.org/badge/520408889.svg)](https://zenodo.org/badge/latestdoi/520408889)\n\n`runPyNB` is a quick and dirty utility to run (and time) Jupyter notebooks from command-line and makefiles.\n\n\u003c!------------------- Quickstart -------------------\u003e\n## Quickstart\nInstall from PyPI\n```bash\npip install runpynb\n```\n\nGeneral usage: `runpynb \u003cnotebook(s)\u003e [options]` (\".ipynb\" not required)\n\n* `runpynb`: Run all notebooks in directory.\n\n    \u003cpre\u003e\n    $ runpynb\u003c/pre\u003e\n    ![](https://raw.githubusercontent.com/lsys/runpynb/main/assets/_docs/runall.gif)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!------------------------ Usage ----------------------\u003e\n## Usage\n\n* `runpynb \u003cnotebook(s)\u003e -q`: Run quietly (`-q`).\n\n    \u003cpre\u003e\n    $ runpynb hello.ipynb -q\u003c/pre\u003e\n    ![](https://raw.githubusercontent.com/lsys/runpynb/main/assets/_docs/be-quiet.gif)\n    \n* `runpynb \u003cnotebook(s)\u003e -qs`: Run quietly (`-q`) as a sequence of workflow (`-s`). Errors (eg in `error.ipynb`) will break the workflow.\n\n    \u003cpre\u003e\n    $ runpynb error.ipynb hello.ipynb -qs\u003c/pre\u003e\n    ![](https://raw.githubusercontent.com/lsys/runpynb/main/assets/_docs/as-sequence.gif)\n    \n* `runpynb \u003cnotebook(s)\u003e -o`: Save output as separate notebook (`-o`), instead of overwriting existing notebook(s).\n\n    \u003cpre\u003e\n    $ runpynb hello.ipynb -o\u003c/pre\u003e\n    ![](https://raw.githubusercontent.com/lsys/runpynb/main/assets/_docs/output-as-separate-notebook.gif)\n    \n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!---------------------- Options ----------------------\u003e\n## Options\n```bash\nusage: runpynb [-h] [-t TIMEOUT] [-s] [-o] [-v VERSION] [-q] [notebooks ...]\n\nRun (and time) Jupyter notebooks silently in command-line.\n\npositional arguments:\n  notebooks             List of Jupyter notebooks (*.ipynb) to be run\n                        (default=all notebooks in path).\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -t TIMEOUT, --timeout TIMEOUT\n                        Seconds until a cell in the notebook timesout, which\n                        raises a Timeouterror exception (default is 3000=5\n                        mins).\n  -s, --sequence        Sequence implicit in notebook lists. If error occurs\n                        somewhere, stop entire pipeline.\n  -o, --output          Save output as a separate notebook with \"-out\"-suffix\n                        (e.g. *-out.ipynb) instead of overwriting existing\n                        file.\n  -v VERSION, --version VERSION\n                        Version of notebook to return (Default=No conversion).\n                        Notebook will be converted if necessary.\n  -q, --quiet           Be quiet and don't print messages (including run\n                        time). Caution: Does not suppress error messages.\n```\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!----------------- Project status -----------------\u003e\n## Status\n[![Documentation Status](https://readthedocs.org/projects/runpynb/badge/?version=latest)](https://runpynb.readthedocs.io/en/latest/?badge=latest)\n\u003cbr\u003e\n[![Build Status](https://app.travis-ci.com/LSYS/runPyNB.svg?branch=main)](https://app.travis-ci.com/LSYS/runPyNB)\n\u003cbr\u003e\n[![Tests](https://github.com/LSYS/runPyNB/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/LSYS/runPyNB/actions/workflows/tests.yml)\n[![codecov](https://codecov.io/gh/LSYS/runPyNB/branch/main/graph/badge.svg?token=ZtC2IJ07Fa)](https://codecov.io/gh/LSYS/runPyNB)\n\u003cbr\u003e\n[![CI](https://github.com/LSYS/runPyNB/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/LSYS/runPyNB/actions/workflows/build.yml)\n\u003cbr\u003e\n[![CLI](https://github.com/LSYS/runPyNB/actions/workflows/cli.yml/badge.svg?branch=main)](https://github.com/LSYS/runPyNB/actions/workflows/cli.yml)\n\u003cbr\u003e\n[![Doclinks](https://github.com/LSYS/runPyNB/actions/workflows/doclinks.yml/badge.svg?branch=main)](https://github.com/LSYS/runPyNB/actions/workflows/doclinks.yml)\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\u003cbr\u003e\n\n\n\u003c!---------------------- About ---------------------\u003e\n## More on this package\n\nThis is a lightweight package that wraps around the official Jupyter [`nbformat`](https://nbformat.readthedocs.io/en/latest/) and [`nbconvert`](https://nbconvert.readthedocs.io/en/latest/) modules.\n\nMy workflow involves using [`Jupyter notebooks`](https://jupyter.org/) to clean, and analyze data.\nI use this utility to run notebooks silently from the command-line and [`Makefiles`](#usage-with-makefiles) (without converting from `.ipynb` files to `.py` files). \n\nRelated packages are [`guoquan/runnb`](https://github.com/guoquan/runnb) and [`vinayak-mehta/nbcommands`](https://github.com/vinayak-mehta/nbcommands) with a planned enhancement `nbtime` to run Jupyter notebooks from command-line.\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!---------------------- Build ---------------------\u003e\n## Usage with Makefiles\nA minimal workflow where `get-data.ipynb` takes 5000 seconds to prepare `data.csv`.\nAnd where `analyze.ipynb` uses `data.csv` to produce `output.png`.\n```makefile\n.DEFAULT_GOAL := output.png\n\ndata.csv: get-data.ipynb\n\trunpynb $^ -t 5000\n\t\noutput.png: analyze.ipynb data.csv\n\trunpynb $\u003c \n```\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-------------------- License -------------------\u003e\n## License\nThis package is licensed under the [MIT License](https://github.com/LSYS/runPyNB/blob/main/LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsys%2Frunpynb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flsys%2Frunpynb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsys%2Frunpynb/lists"}