Task execution and queue management for agent fleets
Project description
Cocapn Barracks
Task execution and queue management for agent fleets.
Install
pip install cocapn-barracks
Usage
from cocapn_barracks import Task, TaskQueue, Executor
queue = TaskQueue()
queue.enqueue(Task(name="my-task", payload={"data": 42}))
executor = Executor()
executor.register("my-task", lambda x: x["data"] * 2)
task = queue.dequeue()
result = executor.execute(task)
print(result.result.output) # 84
License
MIT
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
cocapn_barracks-0.1.1.tar.gz
(6.1 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
File details
Details for the file cocapn_barracks-0.1.1.tar.gz.
File metadata
- Download URL: cocapn_barracks-0.1.1.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c946f2f52f0809bd296089f95ed08638ebaba53a127810e7d3d370842ec587e7
|
|
| MD5 |
258808892b2642abfaee6ab4f37ce392
|
|
| BLAKE2b-256 |
ccf34286713c6eb35b60d65063e8f7e359234d199df46d71533396e751c29a85
|
File details
Details for the file cocapn_barracks-0.1.1-py3-none-any.whl.
File metadata
- Download URL: cocapn_barracks-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41e56656b7253d1f341aefd5808f06e64952fe4037ff02e3c89f6e097bf279b5
|
|
| MD5 |
2b7bf6050a8b823da4482ae85f63b6b8
|
|
| BLAKE2b-256 |
88f22fe543e7f166c3d4799a1e8904b5fb05f7b63a4de01bfb8489302242044c
|