Usage
pip install dqueue
Example
Memory Queue
# memory queue
import threading
from dqueue.queues import MemoryQueue
from dqueue.item import Item
queue = MemoryQueue()
# 模拟不同延迟发布消息
def publisher():
for i in range(10):
item = Item(data=f'hello {i}')
queue.add(item, i * 1000)
# 模拟消费端取延迟消息
def consumer():
while True:
messages = queue.get(block=10 * 1000)
for msg in messages:
print('message:', msg)
threading.Thread(target=publisher).start()
threading.Thread(target=consumer).start()
Redis Queue
You can continue with the example above and Just change the declare.
from dqueue.queues import RedisQueue
queue = RedisQueue()
# same code
Metadata
Release files for dqueue 0.1.2
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 | |
|---|---|---|---|---|
| dqueue-0.1.2.tar.gz | 7.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dqueue-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.7 kB
Release files / dqueue-0.1.2.tar.gz
| Download URL | dqueue-0.1.2.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
931d71925fc9e71949cedb4eee36dcca1b9c6d322ecc62e0c6514605025fd25b
|
|
BLAKE2b-256 checksum How to use checksums |
da01b4c64030cf3a16e6abe65f8cc6cb45014ed269438db0f6934b62d9f6f583
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.14 CPython/3.10.6 Darwin/21.4.0
|
Release files / dqueue-0.1.2-py3-none-any.whl
| Download URL | dqueue-0.1.2-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bcbe17f2801c4478ebde1742e5bc37ce3e7305b2a2127515cac97db8541672aa
|
|
BLAKE2b-256 checksum How to use checksums |
bac1d5461c54c26c23799867b4c13c09a43cb65dc93bbb3cc73e1cf9615f4fe7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.14 CPython/3.10.6 Darwin/21.4.0
|
Security for dqueue 0.1.2
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.