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.2.0.tar.gz
(6.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
File details
Details for the file cocapn_barracks-0.2.0.tar.gz.
File metadata
- Download URL: cocapn_barracks-0.2.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49ed7c390cf1e2e9ac33f1a6995e509e33cfc74079358f24844ddb492ac550ad
|
|
| MD5 |
a0e94bd847211aa9f2de06e1866df09f
|
|
| BLAKE2b-256 |
0fccd52d0fb128316bb181120d3d8b91368436959cd2fae8d527fdc0f9d4ca2e
|
File details
Details for the file cocapn_barracks-0.2.0-py3-none-any.whl.
File metadata
- Download URL: cocapn_barracks-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.3 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 |
5c23e4d61af91b94acdbb23e06451393b2b261fbcad40f03f74d7eb7da670d95
|
|
| MD5 |
da10879be6284f2f4c9b3dc4b1b67ca1
|
|
| BLAKE2b-256 |
873fb907f0a9c5645b600d2bca7c84b35155549a1dcc19efd0baf89ed7fb00d4
|