wcpan.queue
An utility for asyncio.Queue.
Example
from wcpan.queue import AioQueue
async def task() -> int:
...
async def amain():
# Creates a priority queue.
# Use AioQueue.fifo() for FIFO and AioQueue.lifo() for LIFO.
with AioQueue[int].priority() as queue:
# Push a task which priority is 1, lesser number has higher priority.
# Default is 0.
# Priority is ignored for FIFO and LIFO queues.
await queue.push(task(), 1)
# Spawns 8 consumers to consume the queue.
# The default is 1.
await queue.consume(8)
await queue.push(task())
# Or collect the results like this:
async for result in queue.collect(8):
...
# If any error occurs, the context manager will cleanup all coroutines.
Metadata
Release files for wcpan-queue 7.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 |
|---|---|---|---|---|
| wcpan_queue-7.2.1.tar.gz | 3.1 kB | Without provenance | Details for wcpan_queue-7.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wcpan_queue-7.2.1-py3-none-any.whl | Python 3 | none | any | Details for wcpan_queue-7.2.1-py3-none-any.whl |
Total release size: 6.9 kB
Release files / wcpan_queue-7.2.1.tar.gz
| Download URL | wcpan_queue-7.2.1.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c04e3bb3b9eb1ceb1d2b2df8ed5fa5ae53a7e47375c9d5eee9a27a2ea269ed46
|
|
BLAKE2b-256 checksum How to use checksums |
2e70c19a6317cd4c913c4c3fedb26a819d82982ab1c9e3e8a52c776c7e4e08e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.11.2 Linux/5.15.133.1-microsoft-standard-WSL2
|
Release files / wcpan_queue-7.2.1-py3-none-any.whl
| Download URL | wcpan_queue-7.2.1-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1688ac9727ad943d88972cc5cc591918e344fd499893f7f81cb264fc6489eba9
|
|
BLAKE2b-256 checksum How to use checksums |
e673ec674e250715a2c0a3f08f4e2864032b15e1a69809c73b05a5c3364e2534
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.11.2 Linux/5.15.133.1-microsoft-standard-WSL2
|
Security for wcpan-queue 7.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.