Persistent queue for Python AsyncIO.
Project description
Persistent queue for Python AsyncIO.
Description
This library provides a persistent FIFO queue for Python AsyncIO:
Queue content can persist a process restart
Feature parity with Python’s asyncio.Queue
Similar API to Python’s asyncio.Queue
Sane logging
Type hints
Fully tested
Supports different storage engines
Usage
Here is a basic example on how to use the queue:
import asyncio
from aiodiskqueue import Queue
async def main():
q = await Queue.create("example_queue.sqlite")
await q.put("some item")
item = await q.get()
print(item)
asyncio.run(main())
Please see the examples folder for more usage examples.
Installation
You can install this library directly from PyPI with the following command:
pip install aiodiskqueue
storage Engines
Support different storage engines. The default engine is DbmEngine.
DbmEngine: Stores the queue in a DBM database. Consistent throughput even at higher volumes and much faster then Sqlite
SqliteEngine: Stores the queue in a SQlite database. Consistent throughput even at higher volumes and also process safe
PickledList: Stores the queue in a pickled list. Very fast at smaller volumes, but does not scale well
PickleSequence: Stores the queue in a list of pickled items. Very fast for putting and at smaller volumes, does not scale well
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
Built Distribution
Hashes for aiodiskqueue-0.1.0b7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c72a1809359aecb513b683ff0e52b0732224c1e27d40adafa965d16f3f7f7f4 |
|
MD5 | baae93e91a94cc0974a1e5970dd4bc6c |
|
BLAKE2b-256 | 45223ecd4b1b4fd57475683bf5e44399bb6eff0878783c32274fe577b2c390e7 |