DiskQ
DiskQ is a Python library for persistent queue management. It allows you to store queue data on disk, making it easier to manage your data and prevent data loss in the event of system crashes or power outages.
Installation
You can install DiskQ using pip:
pip install diskq
Usage
PersistentQueue
The PersistentQueue class is used to create a persistent queue. Here's an example:
from diskq import PersistentQueue
# create a new persistent queue
queue = PersistentQueue('my_queue.pkl')
# add items to the queue
queue.put('item1')
queue.put('item2')
queue.put('item3')
# get items from the queue
item1 = queue.get()
item2 = queue.get()
item3 = queue.get()
PersistentPriorityQueue
The PersistentPriorityQueue class is used to create a persistent priority queue. Here's an example:
from diskq import PersistentPriorityQueue
# create a new persistent priority queue
queue = PersistentPriorityQueue('my_priority_queue.pkl')
# add items to the queue with priorities
queue.put((1, 'item1'))
queue.put((2, 'item2'))
queue.put((3, 'item3'))
# get items from the queue in order of priority
item1 = queue.get()
item2 = queue.get()
item3 = queue.get()
PersistentLifoQueue
The PersistentLifoQueue class is used to create a persistent last-in, first-out (LIFO) queue. Here's an example:
from diskq import PersistentLifoQueue
# create a new persistent LIFO queue
queue = PersistentLifoQueue('my_lifo_queue.pkl')
# add items to the queue
queue.put('item1')
queue.put('item2')
queue.put('item3')
# get items from the queue in reverse order
item3 = queue.get()
item2 = queue.get()
item1 = queue.get()
License
This project is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for diskq 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| diskq-1.0.0.tar.gz | 4.7 kB | Without provenance | Details for diskq-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| diskq-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for diskq-1.0.0-py3-none-any.whl |
Total release size: 13.5 kB
Release files / diskq-1.0.0.tar.gz
| Download URL | diskq-1.0.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4f21343fa921e544115b54b5b3bb1ad662470d626e04802714ea9f04684a475
|
|
BLAKE2b-256 checksum How to use checksums |
aec2c0f1f6e9842166be924ff766ff3bf7f9a8ad31f7d39d63f07669d995a715
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / diskq-1.0.0-py3-none-any.whl
| Download URL | diskq-1.0.0-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8fceea201f65468602db0c2f372c43958226f3270928ae12437a998bbb41c1ee
|
|
BLAKE2b-256 checksum How to use checksums |
b8bc74842e6695f82b73c87d3689b406c6bc5bb2f3a3814cfb90f88dacfe98de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for diskq 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.