Skip to main content

Open Jupyter notebooks from GitHub repositories or URLs directly in Jupyter.

Project description

opennb 📓

PyPI Python Versions Ruff pytest

📓 Open Jupyter notebooks from GitHub repositories or URLs directly in Jupyter. Very useful in conjunction with uvx.

[!TIP] Try uvx --with "pipefunc[docs]" opennb pipefunc/pipefunc/example.ipynb to open a notebook from the pipefunc repository and ensure its dependencies are installed.

ToC

Features

  • 📦 Open notebooks directly from GitHub repositories
  • 🔄 Automatic default branch detection
  • 🌳 Support for specific branches
  • 🔗 Direct URL support
  • 🚀 Pass-through of Jupyter notebook arguments
  • 📥 Integration with uvx for dependency management
  • 👽 Also works with Jupytext .md or .py notebooks

Usage

Open a notebook from a GitHub repository:

opennb owner/repo/path/to/notebook.ipynb

This defaults to the default branch of the repository.

Or specify a specific branch:

opennb owner/repo@branch#path/to/notebook.ipynb

Open directly from a URL:

opennb https://example.com/notebook.ipynb

[!IMPORTANT] opennb is especially useful when used with uvx.

Use with uvx to install dependencies and open a notebook in one go:

uvx --with dependency opennb owner/repo/path/to/notebook.ipynb

For example, to open a notebook from the pipefunc repository and ensure its dependencies are installed:

uvx --with "pipefunc[docs]" opennb pipefunc/pipefunc/example.ipynb

Arguments

All arguments after the notebook specification are passed directly to jupyter notebook:

opennb owner/repo/notebook.ipynb --port 8888 --no-browser

Examples

Open a notebook from the main branch:

opennb owner/repo/notebook.ipynb

Open from a specific branch:

opennb jupyter/notebook@main#docs/source/examples/Notebook/Notebook%20Basics.ipynb

Open with custom Jupyter settings:

opennb owner/repo/notebook.ipynb --NotebookApp.token='my-token'

Installation

Install using pip:

pip install opennb

Or using uv:

uv pip install opennb

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

opennb-0.3.1.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opennb-0.3.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file opennb-0.3.1.tar.gz.

File metadata

  • Download URL: opennb-0.3.1.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for opennb-0.3.1.tar.gz
Algorithm Hash digest
SHA256 ac3f7f3fa17e605a5cb21a34787c67913960886183bd125c9c05b954a0188399
MD5 1004155a47b84652197aa7d9d61314eb
BLAKE2b-256 8be24c3c61becd118127188c5837556d3ec072dafe3e7e773e880959e43a5f74

See more details on using hashes here.

Provenance

The following attestation bundles were made for opennb-0.3.1.tar.gz:

Publisher: release.yml on basnijholt/opennb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file opennb-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: opennb-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for opennb-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 24b45f974747b71ee3bc209de87655175ad44e81e55ed8cac7fb919da60845a5
MD5 346dbae21c1a49620fd71e1429067ffd
BLAKE2b-256 1af5ea4b71e9602434a7f0ccf15cf6c333c81e8060ea724062308344a578b17e

See more details on using hashes here.

Provenance

The following attestation bundles were made for opennb-0.3.1-py3-none-any.whl:

Publisher: release.yml on basnijholt/opennb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page