opennb


Nameopennb JSON
Version 0.3.0 PyPI version JSON
download
home_pageNone
SummaryOpen Jupyter notebooks from GitHub repositories or URLs directly in Jupyter.
upload_time2025-01-14 04:51:31
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords development download github jupyter notebook utilities
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # opennb 📓

[![PyPI](https://img.shields.io/pypi/v/opennb)](https://pypi.org/project/opennb/)
[![Python Versions](https://img.shields.io/pypi/pyversions/opennb)](https://pypi.org/project/opennb/)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![pytest](https://github.com/basnijholt/opennb/actions/workflows/pytest-uv.yml/badge.svg)](https://github.com/basnijholt/opennb/actions/workflows/pytest-uv.yml)

📓 Open Jupyter notebooks from GitHub repositories or URLs directly in Jupyter.
Very useful in conjunction with [`uvx`](https://docs.astral.sh/uv/concepts/tools/#tools).

> [!TIP]
> Try `uvx --with "pipefunc[docs]" opennb pipefunc/pipefunc/example.ipynb` to open a notebook from the [`pipefunc`](https://github.com/pipefunc/pipefunc) repository and ensure its dependencies are installed.

<details>
<summary>ToC</summary>
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [Features](#features)
- [Usage](#usage)
  - [Arguments](#arguments)
- [Examples](#examples)
- [Installation](#installation)
- [License](#license)
- [Contributing](#contributing)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
</details>

## 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:

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

This defaults to the default branch of the repository.

Or specify a specific branch:

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

Open directly from a URL:

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

> [!IMPORTANT]
> `opennb` is especially useful when used with [`uvx`](https://docs.astral.sh/uv/guides/tools/).

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

```bash
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:

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

### Arguments

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

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

## Examples

Open a notebook from the main branch:

```bash
opennb owner/repo/notebook.ipynb
```

Open from a specific branch:

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

Open with custom Jupyter settings:

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

## Installation

Install using pip:

```bash
pip install opennb
```

Or using [uv](https://github.com/astral-sh/uv):

```bash
uv pip install opennb
```

## License

MIT License

## Contributing

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

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "opennb",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "development, download, github, jupyter, notebook, utilities",
    "author": null,
    "author_email": "Bas Nijholt <bas@nijho.lt>",
    "download_url": "https://files.pythonhosted.org/packages/5a/01/f6f777fbabf6e932cbbfe9a4e20a5342ad710497c42c22d07a82cdc87dbf/opennb-0.3.0.tar.gz",
    "platform": null,
    "description": "# opennb \ud83d\udcd3\n\n[![PyPI](https://img.shields.io/pypi/v/opennb)](https://pypi.org/project/opennb/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/opennb)](https://pypi.org/project/opennb/)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![pytest](https://github.com/basnijholt/opennb/actions/workflows/pytest-uv.yml/badge.svg)](https://github.com/basnijholt/opennb/actions/workflows/pytest-uv.yml)\n\n\ud83d\udcd3 Open Jupyter notebooks from GitHub repositories or URLs directly in Jupyter.\nVery useful in conjunction with [`uvx`](https://docs.astral.sh/uv/concepts/tools/#tools).\n\n> [!TIP]\n> Try `uvx --with \"pipefunc[docs]\" opennb pipefunc/pipefunc/example.ipynb` to open a notebook from the [`pipefunc`](https://github.com/pipefunc/pipefunc) repository and ensure its dependencies are installed.\n\n<details>\n<summary>ToC</summary>\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n\n- [Features](#features)\n- [Usage](#usage)\n  - [Arguments](#arguments)\n- [Examples](#examples)\n- [Installation](#installation)\n- [License](#license)\n- [Contributing](#contributing)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n</details>\n\n## Features\n\n- \ud83d\udce6 Open notebooks directly from GitHub repositories\n- \ud83d\udd04 Automatic default branch detection\n- \ud83c\udf33 Support for specific branches\n- \ud83d\udd17 Direct URL support\n- \ud83d\ude80 Pass-through of Jupyter notebook arguments\n- \ud83d\udce5 Integration with `uvx` for dependency management\n- \ud83d\udc7d Also works with Jupytext `.md` or `.py` notebooks\n\n## Usage\n\nOpen a notebook from a GitHub repository:\n\n```bash\nopennb owner/repo/path/to/notebook.ipynb\n```\n\nThis defaults to the default branch of the repository.\n\nOr specify a specific branch:\n\n```bash\nopennb owner/repo@branch#path/to/notebook.ipynb\n```\n\nOpen directly from a URL:\n\n```bash\nopennb https://example.com/notebook.ipynb\n```\n\n> [!IMPORTANT]\n> `opennb` is especially useful when used with [`uvx`](https://docs.astral.sh/uv/guides/tools/).\n\nUse with `uvx` to install dependencies and open a notebook in one go:\n\n```bash\nuvx --with dependency opennb owner/repo/path/to/notebook.ipynb\n```\n\nFor example, to open a notebook from the `pipefunc` repository and ensure its dependencies are installed:\n\n```bash\nuvx --with \"pipefunc[docs]\" opennb pipefunc/pipefunc/example.ipynb\n```\n\n### Arguments\n\nAll arguments after the notebook specification are passed directly to `jupyter notebook`:\n\n```bash\nopennb owner/repo/notebook.ipynb --port 8888 --no-browser\n```\n\n## Examples\n\nOpen a notebook from the main branch:\n\n```bash\nopennb owner/repo/notebook.ipynb\n```\n\nOpen from a specific branch:\n\n```bash\nopennb jupyter/notebook@main#docs/source/examples/Notebook/Notebook%20Basics.ipynb\n```\n\nOpen with custom Jupyter settings:\n\n```bash\nopennb owner/repo/notebook.ipynb --NotebookApp.token='my-token'\n```\n\n## Installation\n\nInstall using pip:\n\n```bash\npip install opennb\n```\n\nOr using [uv](https://github.com/astral-sh/uv):\n\n```bash\nuv pip install opennb\n```\n\n## License\n\nMIT License\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Open Jupyter notebooks from GitHub repositories or URLs directly in Jupyter.",
    "version": "0.3.0",
    "project_urls": {
        "Homepage": "https://github.com/basnijholt/opennb"
    },
    "split_keywords": [
        "development",
        " download",
        " github",
        " jupyter",
        " notebook",
        " utilities"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5cb4ac12d08a076e3818ac9841d973bf9ddec07ccfa66be8f4e96cbdbb21b457",
                "md5": "24145fff2ec88d13cad59fd55ca06629",
                "sha256": "6acadb469c7e75908112a2fb1de0928e1c1721f08b6284ed3bc9cd1ef784d474"
            },
            "downloads": -1,
            "filename": "opennb-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "24145fff2ec88d13cad59fd55ca06629",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 6037,
            "upload_time": "2025-01-14T04:51:30",
            "upload_time_iso_8601": "2025-01-14T04:51:30.013865Z",
            "url": "https://files.pythonhosted.org/packages/5c/b4/ac12d08a076e3818ac9841d973bf9ddec07ccfa66be8f4e96cbdbb21b457/opennb-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5a01f6f777fbabf6e932cbbfe9a4e20a5342ad710497c42c22d07a82cdc87dbf",
                "md5": "dde9041a246be7639295a161b7077e19",
                "sha256": "0d34d7e8c6a3ef99881a1ebfae0d0cb3513269ad73158ea6852b018a0e6db593"
            },
            "downloads": -1,
            "filename": "opennb-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "dde9041a246be7639295a161b7077e19",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 9720,
            "upload_time": "2025-01-14T04:51:31",
            "upload_time_iso_8601": "2025-01-14T04:51:31.749876Z",
            "url": "https://files.pythonhosted.org/packages/5a/01/f6f777fbabf6e932cbbfe9a4e20a5342ad710497c42c22d07a82cdc87dbf/opennb-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-14 04:51:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "basnijholt",
    "github_project": "opennb",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "opennb"
}
        
Elapsed time: 0.74264s