Skip to main content

Pluggable, compressed in-memory queues for both sync and asyncio applications.

Project description

qzq

qzq is a pluggable compressed queue for high-performance, memory-efficient buffering in both synchronous and asynchronous Python applications.

This library provides a solution for managing large volumes of in-memory data, such as in streaming data pipelines, logging systems, or high-throughput servers. It transparently compresses objects as they enter a queue and decompresses them upon retrieval, drastically reducing the memory footprint of in-flight data while preserving a simple, familiar queue interface.

Key Features

  • Dual Sync and Async Interfaces: Provides both a thread-safe qzq.CompressedQueue for multi-threaded applications and an qzq.AsyncCompressedQueue for asyncio, both sharing a consistent API.
  • Pluggable Compression Strategies: Ships with built-in, interchangeable strategies for zlib (default), bz2, and lzma. The architecture allows you to easily provide your own custom compression, serialization, or encryption algorithms.
  • Built-in Stats for Observability: Monitor the queue's state in real-time with the .stats property, which provides item count, total raw and compressed data sizes, and the live compression ratio.
  • Designed for Performance: In the asyncio version, CPU-bound compression and decompression tasks are automatically run in a background thread pool to keep the event loop unblocked and your application responsive.
  • Reduces Memory Pressure: Ideal for absorbing large, temporary bursts of data without ballooning memory usage, preventing potential swapping and performance degradation.

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

quez-0.0.1.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quez-0.0.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file quez-0.0.1.tar.gz.

File metadata

  • Download URL: quez-0.0.1.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.10 Linux/6.4.16-cwt.x86_64

File hashes

Hashes for quez-0.0.1.tar.gz
Algorithm Hash digest
SHA256 cd8834aca070e575b96685a4df3b3502d78431a5b99af0ab18120c7bb05619be
MD5 56ce693fd3498e3c824c113af05a79cf
BLAKE2b-256 b8d06cc86b5e898bb6410e2f866c397ab9fc1772765d790a8cf2adcc2c23d3ca

See more details on using hashes here.

File details

Details for the file quez-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: quez-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.10 Linux/6.4.16-cwt.x86_64

File hashes

Hashes for quez-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 789c47790d3eecc7392eca3a9921c78e59700bf9fabe82baf049d11915b4e18e
MD5 ad7d05c96cc1181e6ea522249db575d5
BLAKE2b-256 e002fa2da43e7f8fc10390846cf4f8b5ee2b3fb463c1cf21ab26118e0a254b6f

See more details on using hashes here.

Supported by

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