Skip to main content

Hyrex is a modern, open-source task orchestration framework.

Project description

hyrex-python

Hyrex is a modern, open-source task orchestration framework.

Installation

pip install hyrex

Running on your own infra:

Step 1: Database initialization

  • Set HYREX_DATABASE_URL to your Postgres database connection string
  • Run hyrex init-db

Step 2: Decorate your tasks

  • Instantiate a Hyrex object wherever your tasks are defined:
from hyrex import Hyrex

hy = Hyrex(app_id="my-hyrex-app")
  • Decorate your task:
def NameContext(BaseModel):
    name: str


@hy.task
def say_name(context: NameContext):
    print(context.name)
  • Send your task to the Hyrex queue. A worker will pick it up from there.
say_name.send(NameContext(name="Bob"))

Step 3: Run your worker(s)

  • Make sure HYREX_DATABASE_URL is set.
  • Update this command with the module path to your Hyrex instance:
hyrex run-worker my_app.tasks:hy

Project details


Download files

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

Source Distribution

hyrex-0.5.0.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

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

hyrex-0.5.0-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file hyrex-0.5.0.tar.gz.

File metadata

  • Download URL: hyrex-0.5.0.tar.gz
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for hyrex-0.5.0.tar.gz
Algorithm Hash digest
SHA256 390bb170468bfb3227c555ec8ee3bc4d065652b152c7e21fb933fd82a506e9e7
MD5 c28b5c0833269cd6d5ea775d649847a5
BLAKE2b-256 5b3d038489a18ad42a1128ecddcd62431a8e104802641e3c59dc74cc7964cced

See more details on using hashes here.

File details

Details for the file hyrex-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: hyrex-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for hyrex-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 187144178fb80fcd933d974e3b06b1ef6d4dded9b152f2796bfa211148aa2c75
MD5 a259e005787d2d2d670c99e91c915355
BLAKE2b-256 e627157d752d3c6607934085e0ebdc57b5ae73fa5b6e6c184e59aa572fea3518

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