Skip to main content

Persistent queue for Python AsyncIO.

release python tests codecov docs pre-commit Code style: black

Description

This library provides a persistent FIFO queue for Python AsyncIO:

  • Queue content 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 and can be extended with custom 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

Logging

The name of the logger for all logging by this library is: aiodiskqueue.

Storage Engines

aiodiskqueue support different storage engines. The default engine is DbmEngine.

We measured the throughput for a typical load scenario (5 producers, 1 consumer) with each storage engine:

Measurements
  • DbmEngine: Consistent throughput at low and high volumes and about 3 x faster then Sqlite

  • PickledList: Very fast at low volumes, but does not scale well

  • SqliteEngine: Consistent throughput at low and high volumes. Relatively slow.

The scripts for running the measurements and generating this chart can be found in the measurements folder.

Metadata

Release files for aiodiskqueue 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiodiskqueue 0.1.2
File Size Uploaded
aiodiskqueue-0.1.2.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aiodiskqueue 0.1.2
File Interpreter ABI Platform
aiodiskqueue-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 19.5 kB

Release files / aiodiskqueue-0.1.2.tar.gz

Download URL aiodiskqueue-0.1.2.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
642de32fc92937693a3b65d833d34e03d5fe17d14344f53f7b48173290dde665
BLAKE2b-256 checksum
How to use checksums
718eabdb862425ba43a083829409d95ccc0c18840f2670bb929e68a0345b0d21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.14

Release files / aiodiskqueue-0.1.2-py3-none-any.whl

Download URL aiodiskqueue-0.1.2-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7493b5f911af4f3a2e28f0a88a599b3a7db319e8e70493b431a1bd9945eae20
BLAKE2b-256 checksum
How to use checksums
1ee26abc96f0e5a7153c894fee6fdc050487341f81b797e593245506cb618bc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.14
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page