A Sphinx extension to add Prefect flow visualizations.
Project description
A Sphinx extension to add Prefect flow visualizations.
Overview
This Sphinx extension allows you to add your prefect flow visualization into your Sphinx documentation using a single directive.
Installation
The best way to install this extension is to install it via PyPi:
pip install sphinxcontrib-prefectviz
Configuration
Add 'sphinxcontrib.prefectviz'
to the extensions list in conf.py
.
extensions = [ 'sphinxcontrib.prefectviz' ]
Usage
Long story short:
.. flowviz:: module.submodule.flow
An example:
First of all, you have to make sure that your prefect flow(s) can be imported by your Sphinx project. Let’s start with the following example, our prefect flow is in the same directory with the Sphinx project:
docs
├── _build
├── conf.py
├── index.rst
├── make.bat
├── Makefile
├── _static
├── _templates
└── flow.py
and the flow.py
looks like:
from prefect import task, Flow
@tast
def hello_world():
print("Hello world")
with Flow(name="foo") as flow:
hello_world()
Finally, add the flow visualization using the following directive:
.. flowviz:: flow.flow
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sphinxcontrib-prefectviz-0.1.1.dev2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 559be004c0af14aacab5e16720c360b5037f2629b2fc4a2d817c0827b6109652 |
|
MD5 | d535c2fe2a4b449ae7fd4998be7a2255 |
|
BLAKE2b-256 | d8181aaa1e510ba284b09ef262c5d46a24cf9aade4749a97248c4f14bc333f34 |
Hashes for sphinxcontrib_prefectviz-0.1.1.dev2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d86017d6143b05adf4c4aa0352e4f30014ce51cb0758e60e70a5c0d5321dafa |
|
MD5 | b2f5c4f90464b4b3b35ef281d963aa40 |
|
BLAKE2b-256 | 3d4c42323a2cbece9f86e0505a5dae1e15526b55aa64470ec34479ef1b5210cf |