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
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
queue-file-0.1.0.tar.gz
(5.9 kB
view hashes)
Built Distribution
Close
Hashes for queue_file-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a830bfce3cd5497966f02ca3cdac2ffff2817592ac1a6232d1f2e768d25aaf0f |
|
MD5 | 0ee7393ca87df5101ce6189bb4dc6b11 |
|
BLAKE2b-256 | 0cd814bc68d0055ea4969aa84a669991bef9317d7d9cf0c2ad2ba9538cc9b631 |