papermill-origami


Namepapermill-origami JSON
Version 0.0.29 PyPI version JSON
download
home_pagehttps://github.com/noteable-io/papermill-origami
SummaryThe noteable API interface
upload_time2023-07-20 21:18:33
maintainerMatt Seal
docs_urlNone
authorMatt Seal
requires_python>=3.8,<4.0
licenseBSD-3-Clause
keywords notebook api noteable
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # papermill-origami
    A papermill engine for running Noteable notebooks

<p align="center">
<a href="https://github.com/noteable-io/papermill-origami/actions/workflows/ci.yaml">
    <img src="https://github.com/noteable-io/papermill-origami/actions/workflows/ci.yaml/badge.svg" alt="CI" />
</a>
<img alt="PyPI - License" src="https://img.shields.io/pypi/l/papermill-origami" />
<img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/papermill-origami" />
<img alt="PyPI" src="https://img.shields.io/pypi/v/papermill-origami">
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
</p>

---------

[Install](#installation) | [Getting Started](#getting-started) | [Documentation](https://papermill-origami.readthedocs.io/) | [License](./LICENSE) | [Code of Conduct](./CODE_OF_CONDUCT.md) | [Contributing](./CONTRIBUTING.md)

<!-- --8<-- [start:intro] -->
## Intro to Papermill-Origami

Papermill-Origami is the bridge library between the [Origami Noteable SDK](https://noteable-origami.readthedocs.io/en/latest/) and [Papermill](https://papermill.readthedocs.io/en/latest/). The papermill engine can talk to Noteable APIs to run Notebooks. 
<!-- --8<-- [end:intro] -->

<!-- --8<-- [start:requirements] -->
## Requirements

Python 3.8+
<!-- --8<-- [end:requirements] -->

<!-- --8<-- [start:install] -->
## Installation

### Poetry

```shell
poetry add papermill-origami
```

### Pip
```shell
pip install papermill-origami
```
<!-- --8<-- [end:install] -->

<!-- --8<-- [start:start] -->
## Getting Started

### API Token

Get your access token from your User Settings -> API Tokens

or alternatively you can generate a post request to generate a new token

```
curl -X 'POST' \
  'https://app.noteable.io/gate/api/v1/tokens' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "ttl": 31536000,
  "name": "my_token"
}'
```

### Engine Registration

The `noteable` engine keyword will use the following environment variables by default:

```bash
NOTEABLE_DOMAIN = app.noteable.io
NOTEABLE_TOKEN = MY_TOKEN_VALUE_HERE
```

Then the engine is enabled by running papermill as normal. But now you have access to
the `noteable://` scheme as well as the ability to tell papermill to use Noteable as
the execution location for your notebook.

```python
import papermill as pm

file_id = '...'

pm.execute_notebook(
    f'noteable://{file_id}',
    None, # Set no particular output notebook, but a log of the resulting exeuction link still prints
    # This turns on the Noteable API interface
    engine_name='noteable', # exclude this kwarg to run the Notebook locally
)
```

#### Advanced Setup

For more advanced control or reuse of a NoteableClient SDK object you can use
the async await pattern around a client constructor. This reuses the connection
throughout the life cycle of the context block.

```python
import papermill as pm
from papermill.iorw import papermill_io
from papermill_origami import ClientConfig, NoteableClient, NoteableHandler 


domain = 'app.noteable.io'
token = MY_TOKEN_VALUE_HERE
file_id = '...'

async with NoteableClient(token, config=ClientConfig(domain=domain)) as client:
    file = await client.get_notebook(file_id)
    papermill_io.register("noteable://", NoteableHandler(client))
    pm.execute_notebook(
        f'noteable://{file_id}',
        None,
        engine_name='noteable',
        # Noteable-specific kwargs
        file=file,
        client=client,
    )
```
<!-- --8<-- [end:start] -->

## Contributing

See [CONTRIBUTING.md](./CONTRIBUTING.md).

-------

<p align="center">Open sourced with ❤️ by <a href="https://noteable.io">Noteable</a> for the community.</p>

<img href="https://pages.noteable.io/private-beta-access" src="https://assets.noteable.io/github/2022-07-29/noteable.png" alt="Boost Data Collaboration with Notebooks">

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/noteable-io/papermill-origami",
    "name": "papermill-origami",
    "maintainer": "Matt Seal",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "matt@noteable.io",
    "keywords": "notebook,api,noteable",
    "author": "Matt Seal",
    "author_email": "matt@noteable.io",
    "download_url": "https://files.pythonhosted.org/packages/62/12/393c94bdcd8cd23d9b82207f2a24b676dfa928245f67d6deab36030f716e/papermill_origami-0.0.29.tar.gz",
    "platform": null,
    "description": "# papermill-origami\n    A papermill engine for running Noteable notebooks\n\n<p align=\"center\">\n<a href=\"https://github.com/noteable-io/papermill-origami/actions/workflows/ci.yaml\">\n    <img src=\"https://github.com/noteable-io/papermill-origami/actions/workflows/ci.yaml/badge.svg\" alt=\"CI\" />\n</a>\n<img alt=\"PyPI - License\" src=\"https://img.shields.io/pypi/l/papermill-origami\" />\n<img alt=\"PyPI - Python Version\" src=\"https://img.shields.io/pypi/pyversions/papermill-origami\" />\n<img alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/papermill-origami\">\n<a href=\"https://github.com/psf/black\"><img alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"></a>\n</p>\n\n---------\n\n[Install](#installation) | [Getting Started](#getting-started) | [Documentation](https://papermill-origami.readthedocs.io/) | [License](./LICENSE) | [Code of Conduct](./CODE_OF_CONDUCT.md) | [Contributing](./CONTRIBUTING.md)\n\n<!-- --8<-- [start:intro] -->\n## Intro to Papermill-Origami\n\nPapermill-Origami is the bridge library between the [Origami Noteable SDK](https://noteable-origami.readthedocs.io/en/latest/) and [Papermill](https://papermill.readthedocs.io/en/latest/). The papermill engine can talk to Noteable APIs to run Notebooks. \n<!-- --8<-- [end:intro] -->\n\n<!-- --8<-- [start:requirements] -->\n## Requirements\n\nPython 3.8+\n<!-- --8<-- [end:requirements] -->\n\n<!-- --8<-- [start:install] -->\n## Installation\n\n### Poetry\n\n```shell\npoetry add papermill-origami\n```\n\n### Pip\n```shell\npip install papermill-origami\n```\n<!-- --8<-- [end:install] -->\n\n<!-- --8<-- [start:start] -->\n## Getting Started\n\n### API Token\n\nGet your access token from your User Settings -> API Tokens\n\nor alternatively you can generate a post request to generate a new token\n\n```\ncurl -X 'POST' \\\n  'https://app.noteable.io/gate/api/v1/tokens' \\\n  -H 'accept: application/json' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"ttl\": 31536000,\n  \"name\": \"my_token\"\n}'\n```\n\n### Engine Registration\n\nThe `noteable` engine keyword will use the following environment variables by default:\n\n```bash\nNOTEABLE_DOMAIN = app.noteable.io\nNOTEABLE_TOKEN = MY_TOKEN_VALUE_HERE\n```\n\nThen the engine is enabled by running papermill as normal. But now you have access to\nthe `noteable://` scheme as well as the ability to tell papermill to use Noteable as\nthe execution location for your notebook.\n\n```python\nimport papermill as pm\n\nfile_id = '...'\n\npm.execute_notebook(\n    f'noteable://{file_id}',\n    None, # Set no particular output notebook, but a log of the resulting exeuction link still prints\n    # This turns on the Noteable API interface\n    engine_name='noteable', # exclude this kwarg to run the Notebook locally\n)\n```\n\n#### Advanced Setup\n\nFor more advanced control or reuse of a NoteableClient SDK object you can use\nthe async await pattern around a client constructor. This reuses the connection\nthroughout the life cycle of the context block.\n\n```python\nimport papermill as pm\nfrom papermill.iorw import papermill_io\nfrom papermill_origami import ClientConfig, NoteableClient, NoteableHandler \n\n\ndomain = 'app.noteable.io'\ntoken = MY_TOKEN_VALUE_HERE\nfile_id = '...'\n\nasync with NoteableClient(token, config=ClientConfig(domain=domain)) as client:\n    file = await client.get_notebook(file_id)\n    papermill_io.register(\"noteable://\", NoteableHandler(client))\n    pm.execute_notebook(\n        f'noteable://{file_id}',\n        None,\n        engine_name='noteable',\n        # Noteable-specific kwargs\n        file=file,\n        client=client,\n    )\n```\n<!-- --8<-- [end:start] -->\n\n## Contributing\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md).\n\n-------\n\n<p align=\"center\">Open sourced with \u2764\ufe0f by <a href=\"https://noteable.io\">Noteable</a> for the community.</p>\n\n<img href=\"https://pages.noteable.io/private-beta-access\" src=\"https://assets.noteable.io/github/2022-07-29/noteable.png\" alt=\"Boost Data Collaboration with Notebooks\">\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "The noteable API interface",
    "version": "0.0.29",
    "project_urls": {
        "Homepage": "https://github.com/noteable-io/papermill-origami",
        "Repository": "https://github.com/noteable-io/papermill-origami"
    },
    "split_keywords": [
        "notebook",
        "api",
        "noteable"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "648a2e58e7ceabb229bd805f0c4ff55f11d7b30d0b2b040d3219d2cc2422f704",
                "md5": "48010622d9441410c2900a2dd3f29994",
                "sha256": "c314782f60b9ee80ae15b0d4212741e53b427f27d68136ada6ea3de10195b9da"
            },
            "downloads": -1,
            "filename": "papermill_origami-0.0.29-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "48010622d9441410c2900a2dd3f29994",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 35845,
            "upload_time": "2023-07-20T21:18:32",
            "upload_time_iso_8601": "2023-07-20T21:18:32.385238Z",
            "url": "https://files.pythonhosted.org/packages/64/8a/2e58e7ceabb229bd805f0c4ff55f11d7b30d0b2b040d3219d2cc2422f704/papermill_origami-0.0.29-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6212393c94bdcd8cd23d9b82207f2a24b676dfa928245f67d6deab36030f716e",
                "md5": "5b57fb19d14538b346b0fe12911b963e",
                "sha256": "a70cee2b07abad804c13216e0fc70e6c0cda90148292e8e512f707c7fbbcd6e4"
            },
            "downloads": -1,
            "filename": "papermill_origami-0.0.29.tar.gz",
            "has_sig": false,
            "md5_digest": "5b57fb19d14538b346b0fe12911b963e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 28502,
            "upload_time": "2023-07-20T21:18:33",
            "upload_time_iso_8601": "2023-07-20T21:18:33.419677Z",
            "url": "https://files.pythonhosted.org/packages/62/12/393c94bdcd8cd23d9b82207f2a24b676dfa928245f67d6deab36030f716e/papermill_origami-0.0.29.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-20 21:18:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "noteable-io",
    "github_project": "papermill-origami",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "papermill-origami"
}
        
Elapsed time: 0.09154s