Skip to main content

queue-file

Project description

QueueFile

QueueFile is a basic file-based queue system for Python. It's designed for simplicity, not performance.

Features

  • File-based persistence
  • Thread-safe operations
  • Max queue size limit

Installation

pip install queue-file

Usage

from queue_file import QueueFile

# Create a queue
q = QueueFile("/tmp/my_queue.txt", max_size=1000)

# Add items
q.enqueue("task1")
q.enqueue("task2")

# Get items
item = q.dequeue()  # Returns "task1"

# Check size
size = q.size()  # Returns 1

# Clear queue
q.clear()

Limitations

  • Not suitable for queues larger than 10,000 items
  • Performance decreases with queue size

This project is released under the CC0 license, dedicating it to the public domain.

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

queue-file-0.1.0.tar.gz (5.9 kB view hashes)

Uploaded Source

Built Distribution

queue_file-0.1.0-py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 3

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