Kolona
A minimalistic in-memory async Python Task queue.
Install
pip install kolona
Features
- Retry tasks
- Multiple workers
- In-memor only (no 3rd party message brokers required)
- Python native using asyncio
- Statically typed
Example
import asyncio
from kolona import task, Workers
# create a queue
QUEUE = asyncio.Queue()
@task(queue=QUEUE, max_retries=2)
async def purchase_listener(*args):
print(f"purchase_listener -> args: {args}")
@task(queue=QUEUE, max_retries=3)
async def account_checker(*args):
print(f"account_checker doing checking")
async def main():
# queue 1 account_checker task
await account_checker.enqueue()
# queue 3 purchase_listener tasks, pass an argument into it
for x in range(3):
print(f"Queueing: task-{x}")
await purchase_listener.enqueue(f"task-{x}")
# start 3 workers
workers = Workers(queue=QUEUE, name="worker", count=3)
# block on workers
await asyncio.gather(*workers.get())
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
Metadata
Release files for kolona 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kolona-0.2.1.tar.gz | 6.8 kB | Without provenance | Details for kolona-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kolona-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for kolona-0.2.1-py3-none-any.whl |
Total release size: 12.9 kB
Release files / kolona-0.2.1.tar.gz
| Download URL | kolona-0.2.1.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4de5cb6370a9cd257bb57ca5a804471d99004c8c4b7cb220b8fa20dd8ae7e48d
|
|
BLAKE2b-256 checksum How to use checksums |
e59d0319a5b12d62fde1fc5883d03779f0679be2729b1d7ed23b2b040f404816
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.9
|
Release files / kolona-0.2.1-py3-none-any.whl
| Download URL | kolona-0.2.1-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b907f53e8037a38b28e2c474a9c07bfefabc3d4df0546d1f44e3244391ff0e45
|
|
BLAKE2b-256 checksum How to use checksums |
4ad63e48d364434c0ae3bc58147cb366e69cbdc75d30bd6871f497f5ce75c114
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.9
|
Security for kolona 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.