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.2.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.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: opennb-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 5c88672aa9a46c8a1f6389f7d07cce03308ae18688ae544357ed7cf7afba9a93
MD5 e411fb5b867f077f201fffc1fa0e6e17
BLAKE2b-256 c68af3c66d7754b3844f56c1441c984f159314b4e3fb5d7ac1211d508d25c1a3

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: opennb-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 4.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f3e55dad8e1b9cd004d43979490f11144b43600ed841f783fa44082eb9426895
MD5 f2dad15202a4e8253d9b8295d5491e21
BLAKE2b-256 fa7ab9976e5febfa35a02d89c97fb0a90aae557c8216b6c08c5e5137be1cf1e0

See more details on using hashes here.

Provenance

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