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.6.0.tar.gz
(25.3 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.6.0-py3-none-any.whl
(30.4 kB
view details)
File details
Details for the file hyrex-0.6.0.tar.gz.
File metadata
- Download URL: hyrex-0.6.0.tar.gz
- Upload date:
- Size: 25.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fc56745114803eb07d23e9cdffab1dad4ab53b1b3acce60f3e5d7e83de045c6
|
|
| MD5 |
153fd3ac6eed1e47eca75af5132d7fda
|
|
| BLAKE2b-256 |
61661ac634877ebc8bc360b9865605b5caff5a6f3658422c4a282aa580ad673b
|
File details
Details for the file hyrex-0.6.0-py3-none-any.whl.
File metadata
- Download URL: hyrex-0.6.0-py3-none-any.whl
- Upload date:
- Size: 30.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5eda05adc5e05481e8a58cc3d4323b1b6918229a5c5bcd10f6996f293ed65dfa
|
|
| MD5 |
1c4e13ef0f2cc68a1e31d9088dfb98ec
|
|
| BLAKE2b-256 |
231fe1ee40484738fe00f57a40dc96179957790565cc13846f46fc89a8cc0a76
|