Jupyter notebooks runner
Project description
nbr
NBR lets you run local and remote jupyter-notebooks.
Installation
In a terminal, run:
pip install nbr
Usage
Launch a Jupyter server:
jupyter server
Execution a local notebook, using a remote server:
import asyncio
from nbr import NotebookRunner, Notebook, JupyterAPI, ExecutionStatus
async def main() -> None:
jupyter_api = JupyterAPI()
notebook = Notebook.read_file(path="Untitled.ipynb")
async with NotebookRunner(notebook=notebook, jupyter_api=jupyter_api) as runner:
result = await runner.execute_all_cells()
if result.status == ExecutionStatus.SUCCESS:
notebook.save(path="Executed.ipynb")
if __name__ == "__main__":
asyncio.run(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nbr-1.0.0b0.tar.gz
(7.5 kB
view hashes)
Built Distribution
nbr-1.0.0b0-py3-none-any.whl
(9.6 kB
view hashes)