Skip to main content

The Prefect Core automation and scheduling engine.

Project description

Looking for the latest Prefect 2.0 release? Prefect 2.0 and Prefect Cloud 2.0 have been released for General Availability. See https://docs.prefect.io/ for details.

Prefect 1.0 Core, Server, and Cloud are our first-generation workflow and orchestration tools. You can continue to use them and we'll continue to support them while migrating users to Prefect 2.0.

If you're ready to start migrating your workflows to Prefect 2.0, see our migration guide.

If you are unsure which Prefect version to choose for your specific use case, this Prefect Discourse page may help you decide.

Hello, world! 👋

We've rebuilt data engineering for the data science era.

Prefect is a new workflow management system, designed for modern infrastructure and powered by the open-source Prefect Core workflow engine. Users organize Tasks into Flows, and Prefect takes care of the rest.

Read the docs; get the code; ask us anything; chat with the community via Prefect Discourse!

Welcome to Workflows

Prefect's Pythonic API should feel familiar for newcomers. Mark functions as tasks and call them on each other to build up a flow.

from prefect import task, Flow, Parameter


@task(log_stdout=True)
def say_hello(name):
    print("Hello, {}!".format(name))


with Flow("My First Flow") as flow:
    name = Parameter('name')
    say_hello(name)


flow.run(name='world') # "Hello, world!"
flow.run(name='Marvin') # "Hello, Marvin!"

For more detail, please see the Core docs

UI and Server

In addition to the Prefect Cloud platform, Prefect includes an open-source backend for orchestrating and managing flows, consisting primarily of Prefect Server and Prefect UI. This local server stores flow metadata in a Postgres database and exposes a GraphQL API.

By default, Prefect is configured to use Prefect Cloud as the backend, and you can set Prefect Cloud as the backend by running the command:

$ prefect backend cloud

To use Prefect Server as the backend, run the following command to configure Prefect for local orchestration:

$ prefect backend server

Please note the server requires Docker and Docker Compose to be running.

To start the server, UI, and all required infrastructure, run:

$ prefect server start

Once all components are running, you can view the UI by visiting http://localhost:8080.

Tip: Check our troubleshooting guide if you run into any issues starting the server.

Please note that executing flows from the server requires at least one Prefect Agent to be running. For example, to start the local Agent, run the following command:

$ prefect agent local start

Finally, to register any flow with the server, call flow.register(project_name="<project_name>") within your flow using the name of your project. For more detail, please see the orchestration docs.

"...Prefect?"

From the Latin praefectus, meaning "one who is in charge", a prefect is an official who oversees a domain and makes sure that the rules are followed. Similarly, Prefect is responsible for making sure that workflows execute properly.

It also happens to be the name of a roving researcher for that wholly remarkable book, The Hitchhiker's Guide to the Galaxy.

Integrations

Thanks to Prefect's growing task library and deep ecosystem integrations, building data applications is easier than ever.

Something missing? Open a feature request or contribute a PR! Prefect was designed to make adding new functionality extremely easy, whether you build on top of the open-source package or maintain an internal task library for your team.

Task Library

The Prefect Task Library is a constantly growing list of pre-defined tasks that provide off-the-shelf functionality for working with a wide range of tools anywhere from shell script execution to Kubernetes job management to sending tweets.

Resources

Prefect provides a variety of resources to help guide you to a successful outcome.

We are committed to ensuring a positive environment, and all interactions are governed by our Code of Conduct.

Documentation

Prefect's documentation -- including concepts, tutorials, and a full API reference -- is always available at docs.prefect.io.

Instructions for contributing to documentation can be found in the development guide.

Prefect Discourse

Join our forum to share knowledge, discuss ideas, find answers to common questions and get support.

Slack Community

Join our Slack to chat about Prefect, ask questions, and share tips.

Blog

Visit the Prefect Blog for updates and insights from the Prefect team.

Support

Prefect offers a variety of community and premium support options for users of both Prefect Core and Prefect Cloud.

Contributing

Read about Prefect's community or dive in to the development guides for information about contributions, documentation, code style, and testing.

Installation

Requirements

Prefect requires Python 3.7+. If you're new to Python, we recommend installing the Anaconda distribution.

Latest Release

Note: with the general availability of Prefect 2.0, you will need to specify the Prefect version when installing or updating Prefect 1.0 via a package manager.

To install Prefect, run:

pip install "prefect==1.*"

If you prefer to use conda:

conda install -c conda-forge "prefect>=1.24,<2"

If you use pipenv:

pip install "prefect==1.*"

Bleeding Edge

For development or just to try out the latest features, you may want to install Prefect directly from source.

Please note that the master branch of Prefect is not guaranteed to be compatible with Prefect Cloud or the local server.

git clone https://github.com/PrefectHQ/prefect.git
pip install ./prefect

License

Prefect Core is licensed under the Apache Software License Version 2.0. Please note that Prefect Core includes utilities for running Prefect Server and the Prefect UI, which are themselves licensed under the Prefect Community License.

Project details


Release history Release notifications | RSS feed

This version

1.3.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prefect-1.3.1.tar.gz (465.4 kB view details)

Uploaded Source

Built Distribution

prefect-1.3.1-py3-none-any.whl (604.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: prefect-1.3.1.tar.gz
  • Upload date:
  • Size: 465.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.13

File hashes

Hashes for prefect-1.3.1.tar.gz
Algorithm Hash digest
SHA256 dd5bb15344be79c2fad40da5fba135cd3d3d6e11a858a1f37daf9d2469179b75
MD5 9d31d0159573403d019002f1c0b9f90e
BLAKE2b-256 6a72b47c6d99b1130efa4aee175af8b93b811abc9e9160a65bae3308cb62c7f6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: prefect-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 604.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.13

File hashes

Hashes for prefect-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e97194909551b645f957cc41257c0cd6eee4fd986763edc0550c2a580a5aac07
MD5 8f1024b867a5af7fc9efe56d823067a5
BLAKE2b-256 690fcfb9ab43aaadb9fee1253c97b8a68346ab813fbed4afddc769e552e33525

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