queue-local-python-package
Usage:
Install: pip install queue-local
(Preferable you add queue-local to requirements.txt)
Use the DatabaseQueue:
from queue_local.database_queue import DatabaseQueue
q = DatabaseQueue()
q.push({"item": "test 1", "action_id": 1})
result = q.peek() # "test 1" is still in the queue
result = q.get() # "test 1" is no longer in the queue
result = q.get_by_action_ids(action_ids=(1, )) # action_ids must be tuple
Inherit from our abstract queue:
from queue_local.our_queue import OurQueue
class YourClass(OurQueue):
def __init__(self):
pass
def push(self, item):
"""push to the queue"""
pass
def get(self):
"""get from the queue (and delete)"""
pass
def peek(self):
"""get the head of the queue (without deleting)"""
pass
# add whatever functions you like, like is_empty()
Metadata
Release files for queue-local 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| queue-local-0.0.8.tar.gz | 1.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| queue_local-0.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.3 kB
Release files / queue-local-0.0.8.tar.gz
| Download URL | queue-local-0.0.8.tar.gz |
|---|---|
| Size | 1.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3539a34e69702c2eb1d0641232539cb09f9ba0ba303816d0ca98728912b4e4d6
|
|
BLAKE2b-256 checksum How to use checksums |
742a11e7cf27d1a339b3be58b722b335bd5427d0e0cd5df02c853c6fc2f70e89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / queue_local-0.0.8-py3-none-any.whl
| Download URL | queue_local-0.0.8-py3-none-any.whl |
|---|---|
| Size | 1.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9916c91282eefbd98341d710942477b11aff0e2dbd20708931bfd7570dfa4085
|
|
BLAKE2b-256 checksum How to use checksums |
cb61676fafd5b2bdfd8d27b556d973006aaf13d0c3ff49438fe8ef92f59e7ec7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|