Skip to main content

Workflow orchestration and management.

Project description

Orion

A development repo for Prefect Orion; reference documentation can be found at https://orion-docs.prefect.io/

Installation

$ git clone https://github.com/PrefectHQ/orion.git
$ pip install -e "./orion[dev]"

Running the Orion server

Please note steps 1 and 2 are optional. The Orion server will use an in-memory SQLite database by default. If using the in-memory default database, migrations will occur automatically and the database will not persist data when the server is stopped.

Step 1: Configure the database connection

Orion server works against SQLite and Postgresql. To specify which database to connect to, set the PREFECT_ORION_DATABASE_CONNECTION_URL environment variable.

To connect to a SQLite database (easiest/recommended option):

export PREFECT_ORION_DATABASE_CONNECTION_URL=sqlite+aiosqlite:////tmp/orion.db

To connect to a Postgres database, the connection string should look something like this:

export PREFECT_ORION_DATABASE_CONNECTION_URL=postgresql+asyncpg://<username>:<password>@<hostname>/<dbname>'

Step 2: Ensuring database is up to date

For the time being, there is no framework for migrations. "Migrating" the database consists of creating the correct tables.

To migrate the database, run the following two lines in a python repl

import prefect, asyncio
asyncio.run(prefect.orion.utilities.database.create_db())

Note that for SQLite databases, models are created automatically if the database is in-memory or is being created for the first time.

Step 3: Running the server

Use the following command to run an Orion server locally:

uvicorn prefect.orion.api.server:app --reload

The --reload flag will automatically reload when changes are made the source files.

Step 4: Interacting with the Orion REST API

The Orion server features interactive documentation, which will actually make requests against the server and trigger database changes.

After starting the server, navigate to localhost:8000/docs. On this page, you'll find documentation of requests and responses for all endpoints. The docs also pre-populate example data you can use to test out requests.

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.0a1.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prefect-2.0a1-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file prefect-2.0a1.tar.gz.

File metadata

  • Download URL: prefect-2.0a1.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for prefect-2.0a1.tar.gz
Algorithm Hash digest
SHA256 4df473e5efa43134c1fd27cafdd23da66abf41d2aae134792ddcd6a33bb4c26d
MD5 79a512712c646d784eec534addfd6775
BLAKE2b-256 6853bb840faeeda2ebff72691f80dc0ee0cb28470885f9c3232048c15983e0f3

See more details on using hashes here.

File details

Details for the file prefect-2.0a1-py3-none-any.whl.

File metadata

  • Download URL: prefect-2.0a1-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for prefect-2.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 efa0ada0b00e0e6a5f1dd4d906660887f529e3281d063f621ebce5deeadcbd70
MD5 9cee13a80d55ad1ac22534c8397f9581
BLAKE2b-256 59278c36afac2be70bbf7266dd3ae3614adcd1debdc1ac7b467cdb268f20ea13

See more details on using hashes here.

Supported by

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