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 details)
Built Distribution
nbr-1.0.0b0-py3-none-any.whl
(9.6 kB
view details)
File details
Details for the file nbr-1.0.0b0.tar.gz
.
File metadata
- Download URL: nbr-1.0.0b0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.2 Darwin/21.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c19f5bc628fbed3db627884d9810e793aa42e419974c8ceae5bd13857b8f45c3 |
|
MD5 | 3bf4f70e0a74e0296f82624a5dd8bd18 |
|
BLAKE2b-256 | c4ee6739e8c7209ca872214f4b8553fd5f53db12311ff6257312d7ca7b46db4c |
File details
Details for the file nbr-1.0.0b0-py3-none-any.whl
.
File metadata
- Download URL: nbr-1.0.0b0-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.2 Darwin/21.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2bfe874847ac51d2772c18f2b38e448d4921d7fa326f4561c51777acf046d5e |
|
MD5 | b71ab16421723695716a49fa5d73694c |
|
BLAKE2b-256 | bab183f0575cdc0b41245540042baf5b7082383e690a848eb3bb8dfdc75e52eb |