Skip to content

Prefect integrations for interacting with the Control Plane platform

License

Notifications You must be signed in to change notification settings

controlplane-com/prefect-cpln

Repository files navigation

prefect-cpln

PyPI

Welcome!

prefect-cpln is a collection of Prefect tasks, flows, and blocks enabling orchestration, observation and management of Control Plane resources.

Jump to examples.

Resources

For more tips on how to use tasks and flows in an integration, check out Use Integrations!

Installation

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.

Example Usage

Use with_options to customize options on any existing task or flow

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!

Feedback

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].

Contributing

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:

  1. Fork the repository
  2. Clone the forked repository
  3. Install the repository and its dependencies:
pip install -e ".[dev]"
  1. Make desired changes
  2. Add tests
  3. Install pre-commit to perform quality checks prior to commit:
 pre-commit install
  1. git commit, git push, and create a pull request

About

Prefect integrations for interacting with the Control Plane platform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages