Skip to main content

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

Project description

opennb 📓

PyPI Python Versions

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

:books: Table of Contents

Installation

Install using pip:

pip install opennb

Or using uv:

uv pip install opennb

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

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'

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

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.2.1.tar.gz (7.7 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.2.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: opennb-0.2.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for opennb-0.2.1.tar.gz
Algorithm Hash digest
SHA256 b8df9913a383138f58a068cea9aade650d47bf2b9b710c19db7b081045554458
MD5 189ab07deb536f883e59648457e4152e
BLAKE2b-256 ed25078ed93c8f1daa9e315c5d5d444483cfd4c8745e5cc98c6bc71cc23851a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for opennb-0.2.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.2.1-py3-none-any.whl.

File metadata

  • Download URL: opennb-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for opennb-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 90ec1c617aa69e34ae9999a733dd8b1bd63afb808b6e80f40205eabd1d8b7804
MD5 86b6191bd048c6c86ce24ddc6322c8b4
BLAKE2b-256 baade5ab7ab0a63c4eb56aadfa7bc576c7d2f45cee76b7bd905f175609c4afed

See more details on using hashes here.

Provenance

The following attestation bundles were made for opennb-0.2.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