{"id":20532091,"url":"https://github.com/prefecthq/server","last_synced_at":"2025-04-05T21:06:53.282Z","repository":{"id":39788438,"uuid":"283590321","full_name":"PrefectHQ/server","owner":"PrefectHQ","description":"The Prefect API and backend","archived":false,"fork":false,"pushed_at":"2023-10-16T14:49:10.000Z","size":3878,"stargazers_count":239,"open_issues_count":9,"forks_count":94,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-29T20:04:54.154Z","etag":null,"topics":["automation","orchestration","prefect","workflow","workflow-engine"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PrefectHQ.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-29T19:56:02.000Z","updated_at":"2025-03-22T17:32:50.000Z","dependencies_parsed_at":"2025-01-18T10:31:16.533Z","dependency_job_id":null,"html_url":"https://github.com/PrefectHQ/server","commit_stats":null,"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrefectHQ%2Fserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrefectHQ%2Fserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrefectHQ%2Fserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrefectHQ%2Fserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PrefectHQ","download_url":"https://codeload.github.com/PrefectHQ/server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399873,"owners_count":20932876,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","orchestration","prefect","workflow","workflow-engine"],"created_at":"2024-11-16T00:12:56.254Z","updated_at":"2025-04-05T21:06:53.261Z","avatar_url":"https://github.com/PrefectHQ.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\" \u003e\n   \u003cimg src=\"https://images.ctfassets.net/gm98wzqotmnx/3Ufcb7yYqcXBDlAhJ30gce/c237bb3254190795b30bf734f3cbc1d4/prefect-logo-full-gradient.svg\" width=\"500\" style=\"max-width: 500px;\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n   \u003ca href=https://circleci.com/gh/PrefectHQ/server/tree/master\u003e\n      \u003cimg src=\"https://circleci.com/gh/PrefectHQ/server/tree/master.svg?style=shield\u0026circle-token=28689a55edc3c373486aaa5f11a1af3e5fc53344\"\u003e\n   \u003c/a\u003e\n\n   \u003ca href=https://github.com/ambv/black\u003e\n      \u003cimg src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"\u003e\n   \u003c/a\u003e\n\n   \u003ca href=\"https://join.slack.com/t/prefect-community/shared_invite/enQtODQ3MTA2MjI4OTgyLTliYjEyYzljNTc2OThlMDE4YmViYzk3NDU4Y2EzMWZiODM0NmU3NjM0NjIyNWY0MGIxOGQzODMxNDMxYWYyOTE\"\u003e\n      \u003cimg src=\"https://prefect-slackin.herokuapp.com/badge.svg\"\u003e\n   \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://images.ctfassets.net/gm98wzqotmnx/3mwImS57DEydMQXU1FCGG/6e36e2d49faf78cf4a166f123c2c43ca/image__5_.png\" height=\"27\"\u003e\n\u003c/p\u003e\n\n**Please note**: If you are new to Prefect, we strongly recommend starting with [Prefect 2](https://docs.prefect.io/) and [Prefect Cloud 2](https://app.prefect.cloud), as they are in [General Availability](https://www.prefect.io/guide/blog/the-global-coordination-plane/). \n\nPrefect 1 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. Prefect 2 can also be self-hosted and does not depend on this repository in any way.\n\nIf you're ready to start migrating your workflows to [Prefect 2](https://github.com/PrefectHQ/prefect), see our [migration guide](https://docs.prefect.io/migration-guide/).\n\n# Prefect Server\n\nPlease note: this repo is for Prefect Server development. If you want to run Prefect Server, the best first step is to install [Prefect](https://github.com/prefecthq/prefect) and run `prefect server start`.\n\nIf you want to install Prefect Server on Kubernetes, take a look at the [Server Helm Chart](./helm/prefect-server).\n\nIf you would like to work on the Prefect UI or open a UI-specific issue, please visit [the Prefect UI repository](https://github.com/PrefectHQ/ui).\n\n## Overview\n\n[Prefect Server](https://docs.prefect.io/orchestration/server/overview.html) is an open source backend that makes it easy to monitor and execute your Prefect flows.\n\nPrefect Server consists of a number of related services including:\n\n- `postgres`: the database persistence layer\n- `hasura`: a GraphQL API for Postgres (http://hasura.io)\n- `graphql`: a Python-based GraphQL server that exposes mutations (actions) representing Prefect Server's logic\n- `apollo`: an Apollo Server that serves as the main user interaction endpoint, and stitches together the `hasura` and `graphql` APIs\n- `towel`: a variety of utility services that provide maintenance routines, because a towel is just about the most massively useful thing an interstellar hitchhiker can carry\n  - `scheduler`: a service that searches for flows that need scheduling and creates new flow runs\n  - `lazarus`: a service that detects when flow runs ended abnormally and should be restarted\n  - `zombie_killer`: a service that detects when task runs ended abnormally and should be failed\n\nThese services are intended to be run within [Docker](https://www.docker.com/) and some CLI commands require [`docker-compose`](https://docs.docker.com/compose/) which helps orchestrate running multiple Docker containers simultaneously.\n\n## Installation\n\n1. Don't Panic.\n\n1. Make sure you have Python 3.7+ and Prefect installed:\n\n   ```\n   pip install prefect\n   ```\n\n1. Clone this repo, then install Prefect Server and its dependencies by running:\n\n   ```\n   pip install -e .\n   cd services/apollo \u0026\u0026 npm install\n   ```\n\n*Note: if installing for local development, it is important to install using the -e flag with `[dev]` extras: `pip install -e \".[dev]\"`*\n\n## Running the system as a developer\n\n*Note: for [deploying Prefect Server](https://docs.prefect.io/orchestration/server/overview.html#deploying-prefect-server), please use the `prefect server start` CLI command in Prefect Core 0.13.0+.*\n\nIf you are doing local development on Prefect Server, it is best to run most services as local processes.\nThis allows for hot-reloading as code changes, setting debugging breakpoints, and generally speeds up the\npace of iteration.\n\nIn order to run the system:\n\n1. Start the database and Hasura in Docker:\n\n   ```bash\n   prefect-server dev infrastructure\n   ```\n\n   _If when starting the infrastructure, you receive an error message stating_ `infrastructure_hasura_1 exited with code 137`, _it is likely a memory issue with Docker. Bumping Docker Memory to 8GB should solve this._\n\n1. Run the database migrations and apply Hasura metadata:\n\n   ```bash\n   prefect-server database upgrade\n   ```\n\n1. In a new terminal, start the services locally:\n\n   ```bash\n   prefect-server dev services\n   ```\n\nYou can use the `-i` (include) or `-e` (exclude) flags to choose specific services:\n\n```bash\n# run only apollo and graphql\nprefect-server dev services -i apollo,graphql\n\n# run all except graphql\nprefect-server dev services -e graphql\n```\n\n## Running tests\n\nPrefect Server has three types of tests:\n\n- `unit tests`: used to validate individual functions\n- `service tests`: used to verify functionality throughout Prefect Server\n- `integration tests`: used to verify functionality between Prefect Core and Server\n\nPrefect Server uses `pytest` for testing. Tests are organized in a way that generally mimics the `src` directory. For example, in order to run all unit tests\nfor the API and the GraphQL server, run:\n\n```bash\npytest tests/api tests/graphql\n```\n\nUnit tests can be run with only `prefect-server dev infrastructure` running. Service and\nintegration tests require Prefect Server's services to be running as well.\n\n## Filing an issue\n\nWhether you'd like a feature or you're seeing a bug, we welcome users filing issues. Helpful\nbug issues include:\n\n- the circumstances surrounding the bug\n- the desired behavior\n- a minimum reproducible example\n\nHelpful feature requests include:\n\n- a description of the feature\n- how the feature could be helpful\n- if applicable, initial thoughts about feature implementation\n\n**Please be aware** that Prefect Server feature requests that might compete with propriety [Prefect Cloud](https://cloud.prefect.io/) features will be rejected.\n\n## License\n\nPrefect Server is lovingly made by the team at [Prefect](https://www.prefect.io) and licensed under the [Prefect Community License](https://www.prefect.io/legal/prefect-community-license/). For information on how you can use, extend, and depend on Prefect Server to automate your data, take a look at our [license](https://github.com/PrefectHQ/server/blob/master/LICENSE) or [contact us](https://www.prefect.io/get-prefect#contact).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprefecthq%2Fserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprefecthq%2Fserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprefecthq%2Fserver/lists"}