Skip to main content

Workflow orchestration and management.

Project description

PyPI

Prefect 2

Prefect 2 is an orchestrator for data-intensive workflows. Powered by an asynchronous orchestration engine, its the easiest way to transform any Python function into a unit of work that can be observed and governed. With Prefect, you can build resilient, dynamic workflows that react to the world around them and recover from unexpected changes. With just a few decorators, Prefect supercharges your code with features like automatic retries, distributed execution, scheduling, caching, and much more. Every activity is tracked and observable with the Prefect server or Prefect Cloud dashboard.

from prefect import flow, task
from typing import List
import httpx


@task(retries=3)
def get_stars(repo: str):
    url = f"https://api.github.com/repos/{repo}"
    count = httpx.get(url).json()["stargazers_count"]
    print(f"{repo} has {count} stars!")


@flow(name="GitHub Stars")
def github_stars(repos: List[str]):
    for repo in repos:
        get_stars(repo)


# run the flow!
github_stars(["PrefectHQ/Prefect"])

After running some flows, fire up the Prefect UI to see what happened:

prefect server start

From here, you can continue to use Prefect interactively or deploy your flows to remote envirnments, running on a scheduled or event-driven basis.

Getting Started

Prefect requires Python 3.7 or later. To install Prefect, run the following command in a shell or terminal session:

pip install prefect

Start by then exploring the core concepts of Prefect workflows, then follow one of our friendly tutorials to learn by example.

Join the community

Prefect 2 is made possible by the most rapidly growing community of thousands of friendly data engineers. Join us in building a new kind of workflow system. The Prefect Slack community is a fantastic place to learn more abou Prefect, ask questions, or get help with workflow design. The Prefect Discourse is an community-driven knowledge base to find answers to your Prefect-related questions. All community forums, including code contributions, issue discussions, and slack messages are subject to our Code of Conduct.

Contribute

See our documentation on contributing to Prefect 2.

Thanks for being part of the mission to build a new kind of workflow system and, of course, happy engineering!

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

prefect-2.8.7.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

prefect-2.8.7-py3-none-any.whl (2.2 MB view details)

Uploaded Python 3

File details

Details for the file prefect-2.8.7.tar.gz.

File metadata

  • Download URL: prefect-2.8.7.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for prefect-2.8.7.tar.gz
Algorithm Hash digest
SHA256 321c6651fc9b692c31a8580e0d528b10bd34274daf6140a9a605b306c94dc416
MD5 8117ce6af1782abaa457d6c93d64cc3f
BLAKE2b-256 7449b088059dd1c69fe3044897a7cba52cbdeb4048f8279d439d52ffe71a9b6b

See more details on using hashes here.

File details

Details for the file prefect-2.8.7-py3-none-any.whl.

File metadata

  • Download URL: prefect-2.8.7-py3-none-any.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for prefect-2.8.7-py3-none-any.whl
Algorithm Hash digest
SHA256 da14d0ca1d7b7be53ed93ab2eafff5269baae0fba970af093dba95ed20a54b70
MD5 5b47e6894572b54df5d72509a04c2816
BLAKE2b-256 45782ab4fd7903d2c97cd6d1e494c0f1cfeffba0bfc0bb759b098e02023435bb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page