A platform to author, schedule and monitor workflows defined as Python code.
Opening the entry
Opening the entry
Prefect is a workflow orchestration framework for building resilient data pipelines in Python
Prefect is a workflow orchestration framework for building data pipelines in Python. It elevates scripts into production workflows with scheduling, caching, retries, and event-based automations. Workflows can be monitored via a self-hosted Prefect server or managed Prefect Cloud dashboard.
pip install -U prefect
from prefect import flow, task
@task(log_prints=True)
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)
if __name__ == "__main__":
github_stars(["PrefectHQ/prefect"])
prefect server startPrefectHQ/prefect is a third-party open-source project, listed here from public GitHub data. ImuTechz did not write it and has not reviewed or security-audited its code. Read the source and its permissions before you install or run it.