opennb


Nameopennb JSON
Version 0.2.3 PyPI version JSON
download
home_pageNone
SummaryOpen Jupyter notebooks from GitHub repositories or URLs directly in Jupyter.
upload_time2024-12-09 03:15:47
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

## 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/14/20/c362b8c04721bff43524d506a1f5aa96663f4ca63864c8e340d9a05d6146/opennb-0.2.3.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\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.2.3",
    "project_urls": {
        "Homepage": "https://github.com/basnijholt/opennb"
    },
    "split_keywords": [
        "development",
        " download",
        " github",
        " jupyter",
        " notebook",
        " utilities"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b736295b8cb1465727fd93e66944e48f5cdf8631337334790e574d1fd0fdc8cc",
                "md5": "ac1a43d4ff6704f49c39777a461e0b40",
                "sha256": "6f9c1abe4f16e48f8f8a5f86ba97fc4191d812d27b07c1c04cc3bf5d6b6505c0"
            },
            "downloads": -1,
            "filename": "opennb-0.2.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ac1a43d4ff6704f49c39777a461e0b40",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 5210,
            "upload_time": "2024-12-09T03:15:45",
            "upload_time_iso_8601": "2024-12-09T03:15:45.561624Z",
            "url": "https://files.pythonhosted.org/packages/b7/36/295b8cb1465727fd93e66944e48f5cdf8631337334790e574d1fd0fdc8cc/opennb-0.2.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1420c362b8c04721bff43524d506a1f5aa96663f4ca63864c8e340d9a05d6146",
                "md5": "4444556465d9b0ecf187fcb2cfe4a0b7",
                "sha256": "7f9e20f9872ce7d7ba47e4a22d9bb1a639007c6b43a9ee8c5bcb901c7e7b62ed"
            },
            "downloads": -1,
            "filename": "opennb-0.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "4444556465d9b0ecf187fcb2cfe4a0b7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 8484,
            "upload_time": "2024-12-09T03:15:47",
            "upload_time_iso_8601": "2024-12-09T03:15:47.455241Z",
            "url": "https://files.pythonhosted.org/packages/14/20/c362b8c04721bff43524d506a1f5aa96663f4ca63864c8e340d9a05d6146/opennb-0.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-09 03:15:47",
    "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.40443s