Skip to main content

Persistent queue for Python AsyncIO.

Project description

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 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiodiskqueue-0.1.0b7.tar.gz (56.7 kB view details)

Uploaded Source

Built Distribution

aiodiskqueue-0.1.0b7-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file aiodiskqueue-0.1.0b7.tar.gz.

File metadata

  • Download URL: aiodiskqueue-0.1.0b7.tar.gz
  • Upload date:
  • Size: 56.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for aiodiskqueue-0.1.0b7.tar.gz
Algorithm Hash digest
SHA256 c43dbca86ad11653b225afc1100d8ad952ea25957f0ddaf126c0824b72e28dd1
MD5 95f7936f5367b65cfebcd7ff4e9c12b0
BLAKE2b-256 0923331a3dc3d56636be4e921414399abbca792ced4f780789cb1d4a86117a7c

See more details on using hashes here.

File details

Details for the file aiodiskqueue-0.1.0b7-py3-none-any.whl.

File metadata

File hashes

Hashes for aiodiskqueue-0.1.0b7-py3-none-any.whl
Algorithm Hash digest
SHA256 5c72a1809359aecb513b683ff0e52b0732224c1e27d40adafa965d16f3f7f7f4
MD5 baae93e91a94cc0974a1e5970dd4bc6c
BLAKE2b-256 45223ecd4b1b4fd57475683bf5e44399bb6eff0878783c32274fe577b2c390e7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page