Skip to content

Commit

Permalink
Update install instructions and simplify README (#14135)
Browse files Browse the repository at this point in the history
Co-authored-by: Bill Palombi <bill@prefect.io>
  • Loading branch information
discdiver and billpalombi committed Jun 19, 2024
1 parent 35df316 commit 347f69c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 47 deletions.
37 changes: 14 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,30 @@

# Prefect

Prefect is an orchestration and observability platform for building, observing, and triaging workflows.
Prefect is an orchestration and observation platform for building and reacting to workflows.
It's the simplest way to transform Python code into an interactive workflow application.

Prefect allows you to expose your workflows through an API so teams dependent on you can programmatically access your pipelines, business logic, and more.
Prefect also allows you to standardize workflow development and deployment across your organization.
With Prefect you can standardize workflow deployment across your organization.

You can build resilient, dynamic workflows that react to the world around them and recover from unexpected changes.

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 can be monitored with a self-hosted [Prefect server](https://docs.prefect.io/latest/guides/host/) instance or managed [Prefect Cloud](https://www.prefect.io/cloud-vs-oss?utm_source=oss&utm_medium=oss&utm_campaign=oss_gh_repo&utm_term=none&utm_content=none) dashboard.
Workflow activity is tracked and can be monitored with a self-hosted [Prefect server](https://docs.prefect.io/latest/guides/host/) instance or managed [Prefect Cloud](https://www.prefect.io/cloud-vs-oss?utm_source=oss&utm_medium=oss&utm_campaign=oss_gh_repo&utm_term=none&utm_content=none) dashboard.

## Getting started

Prefect requires Python 3.9 or later. To [install Prefect](https://docs.prefect.io/getting-started/installation/), run the following command:
Prefect requires Python 3.9 or later. To [install the latest or upgrade to the latest version of Prefect](https://docs.prefect.io/getting-started/installation/), run the following command:

```bash
pip install prefect
pip install -U prefect
```

Then create and run a Python file that uses Prefect `flow` and `task` decorators to orchestrate and observe your workflow - in this case, a simple script that fetches the number of GitHub stars from a repository:

```python
from prefect import flow, task
from typing import List
from typing import list
import httpx


Expand All @@ -55,7 +55,7 @@ def get_stars(repo: str):


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

Expand All @@ -76,6 +76,7 @@ prefect server start
To run your workflow on a schedule, turn it into a deployment and schedule it to run every minute by changing the last line of your script to the following:

```python
if __name__ == "__main__":
github_stars.serve(name="first-deployment", cron="* * * * *")
```

Expand All @@ -97,20 +98,10 @@ Read more about Prefect Cloud [here](https://www.prefect.io/cloud-vs-oss?utm_sou
## prefect-client

If your use case is geared towards communicating with Prefect Cloud or a remote Prefect server, check out our
[prefect-client](https://pypi.org/project/prefect-client/). It was designed to be a lighter-weight option for accessing
client-side functionality in the Prefect SDK and is ideal for use in ephemeral execution environments.
[prefect-client](https://pypi.org/project/prefect-client/). It is a lighter-weight option for accessing client-side functionality in the Prefect SDK and is ideal for use in ephemeral execution environments.

## Next steps

There's lots more you can do to orchestrate and observe your workflows with Prefect!
Start with our [friendly tutorial](https://docs.prefect.io/tutorials) or explore the [core concepts of Prefect workflows](https://docs.prefect.io/concepts/).

## Join the community

Prefect is made possible by the fastest growing community of thousands of friendly data engineers. Join us in building a new kind of workflow system. The [Prefect Slack community](https://prefect.io/slack) is a fantastic place to learn more about Prefect, ask questions, or get help with workflow design. All community forums, including code contributions, issue discussions, and slack messages are subject to our [Code of Conduct](https://discourse.prefect.io/faq).

## Contribute

See our [documentation on contributing to Prefect](https://docs.prefect.io/contributing/overview/).

Thanks for being part of the mission to build a new kind of workflow system and, of course, <i>**happy engineering!**</i>
- Check out the [Docs](https://docs.prefect.io/).
- Join the {Prefect Slack community](https://prefect.io/slack).
- Learn how to [contribute to Prefect](https://docs.prefect.io/contributing/overview/).
21 changes: 0 additions & 21 deletions docs/README.md

This file was deleted.

Empty file removed docs/concepts/work-pools.md
Empty file.
6 changes: 3 additions & 3 deletions docs/getting-started/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ Prefect is published as a Python package. To install the latest stable release o
pip install -U prefect
```

To install a specific Prefect version, specify the version number like this:
To install the most recent Prefect 3 pre-release version, run:

```python
pip install -U "prefect==3.0.0rc2"
pip install -U prefect --pre
```

See available release versions in the [Prefect Release Notes](https://github.com/PrefectHQ/prefect/blob/main/RELEASE-NOTES.md).
Expand All @@ -46,7 +46,7 @@ To confirm that Prefect was installed correctly, run the command `prefect versio
You should see output similar to the following:

```python
Version: 2.17.1
Version: 3.0.0
API version: 0.8.4
Python version: 3.12.2
Git commit: d6bdb075
Expand Down

0 comments on commit 347f69c

Please sign in to comment.