prefect-cpln
is a collection of Prefect tasks, flows, and blocks enabling orchestration, observation and management of Control Plane resources.
Jump to examples.
For more tips on how to use tasks and flows in an integration, check out Use Integrations!
Install prefect-cpln
with pip
:
pip install prefect-cpln
Requires an installation of Python 3.8+.
We recommend using a Python virtual environment manager such as pipenv, conda or virtualenv.
These tasks are designed to work with Prefect 2. For more information about how to use Prefect, please refer to the Prefect documentation.
Then, to register blocks on Prefect Cloud:
prefect block register -m prefect_cpln
Note, to use the load
method on Blocks, you must already have a block document saved through code or saved through the UI.
from prefect_cpln.flows import run_namespaced_job
customized_run_namespaced_job = run_namespaced_job.with_options(
name="My flow running a Control Plane Job",
retries=2,
retry_delay_seconds=10,
) # this is now a new flow object that can be called
For more tips on how to use tasks and flows in an integration, check out Use Integrations!
If you encounter any bugs while using prefect-cpln
, feel free to open an issue in the prefect-cpln repository.
If you have any questions or issues while using prefect-cpln
, you can send an email to [email protected].
If you'd like to help contribute to fix an issue or add a feature to prefect-cpln
, 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
- Install
pre-commit
to perform quality checks prior to commit:
pre-commit install
git commit
,git push
, and create a pull request