prefect-jupyter
Welcome!
Prefect integrations interacting with Jupyter.
Getting Started
Python setup
Requires an installation of Python 3.7+.
We recommend using a Python virtual environment manager such as pipenv, conda or virtualenv.
These tasks are designed to work with Prefect 2.0. For more information about how to use Prefect, please refer to the Prefect documentation.
Installation
Install prefect-jupyter with pip:
pip install prefect-jupyter
Run a parameterized notebook
prefect-jupyter uses papermill under the hood. Check out papermill's documentation to learn how to parametrize the notebook.
The following code shows how to run a parameterized notebook:
from prefect import flow
from prefect_jupyter import notebook
@flow
def example_execute_notebook():
nb = notebook.execute_notebook(
"test_notebook.ipynb",
parameters={"num": 5}
)
body = notebook.export_notebook(nb)
output_path = "executed_notebook.ipynb"
with open(output_path, "w") as f:
f.write(body)
return output_path
example_execute_notebook()
Resources
Feedback
If you encounter any bugs while using prefect-jupyter, feel free to open an issue in the prefect-jupyter repository.
If you have any questions or issues while using prefect-jupyter, you can find help in either the Prefect Discourse forum or the Prefect Slack community.
Feel free to star or watch prefect-jupyter for updates too!
Contributing
If you'd like to help contribute to fix an issue or add a feature to prefect-jupyter, please propose changes through a pull request from a fork of the repository.
Here are the steps:
- Fork the repository
- Clone the forked repository
- Install the repository and its dependencies:
pip install -e ".[dev]"
- Make desired changes
- Add tests
- Insert an entry to CHANGELOG.md
- Install
pre-committo perform quality checks prior to commit:
pre-commit install
git commit,git push, and create a pull request
Metadata
Release files for prefect-jupyter 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| prefect-jupyter-0.3.1.tar.gz | 27.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| prefect_jupyter-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.5 kB
Release files / prefect-jupyter-0.3.1.tar.gz
| Download URL | prefect-jupyter-0.3.1.tar.gz |
|---|---|
| Size | 27.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
327fd4a90bd183c1382fa079b92300dbb0b13a5b8337228fc01c352ee01e516e
|
|
BLAKE2b-256 checksum How to use checksums |
12aeaf03104f7467f9d4b2e7d9284438e5c82fcefb49a46ed986bf2c544cc89e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / prefect_jupyter-0.3.1-py3-none-any.whl
| Download URL | prefect_jupyter-0.3.1-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a9e9f037326ead9a074c0784a0c6497ca826835c563689039c91fde983d0efd
|
|
BLAKE2b-256 checksum How to use checksums |
dc6f48ca939db0cfddd2ec4e8dbff948b05b5995c09576862cce607a7ae9cb56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|