Hyrex is a modern, open-source task orchestration framework.
Project description
hyrex-sdk
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_URLto 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_URLis set. - Update this command with the module path to your Hyrex instance:
hyrex run-worker my_app.tasks:hy
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
hyrex-0.5.2.tar.gz
(19.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
hyrex-0.5.2-py3-none-any.whl
(20.6 kB
view details)
File details
Details for the file hyrex-0.5.2.tar.gz.
File metadata
- Download URL: hyrex-0.5.2.tar.gz
- Upload date:
- Size: 19.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d75ca7b7bcf816aaf25a61db0cfe98731ba759228e19ded32460e86be8709b53
|
|
| MD5 |
8a1feebc15742c9ccff5aa00d20b61cb
|
|
| BLAKE2b-256 |
fa5f9fd66cbba0cc38a3dd9ca07ea83096b10e1fc1117b96d33eecd6efade64e
|
File details
Details for the file hyrex-0.5.2-py3-none-any.whl.
File metadata
- Download URL: hyrex-0.5.2-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.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c53f95202717ed36295eb71e62a5af3f08d86f154104f496d5d0b30def6a44a
|
|
| MD5 |
c0aa66a80953cbef70dae897f531a781
|
|
| BLAKE2b-256 |
044b8ed270345c6ac16f1dffff3d6e2002e9d9a04af78b90d2f0477ad2015c63
|