Skip to main content

No project description provided

Project description

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()

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-local-0.0.8.tar.gz (1.7 kB view details)

Uploaded Source

Built Distribution

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

queue_local-0.0.8-py3-none-any.whl (1.5 kB view details)

Uploaded Python 3

File details

Details for the file queue-local-0.0.8.tar.gz.

File metadata

  • Download URL: queue-local-0.0.8.tar.gz
  • Upload date:
  • Size: 1.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for queue-local-0.0.8.tar.gz
Algorithm Hash digest
SHA256 3539a34e69702c2eb1d0641232539cb09f9ba0ba303816d0ca98728912b4e4d6
MD5 bb1bcf5d3934b9989214c986d7d18e95
BLAKE2b-256 742a11e7cf27d1a339b3be58b722b335bd5427d0e0cd5df02c853c6fc2f70e89

See more details on using hashes here.

File details

Details for the file queue_local-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: queue_local-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 1.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for queue_local-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 9916c91282eefbd98341d710942477b11aff0e2dbd20708931bfd7570dfa4085
MD5 84fda338024f58ff3b442c01c5619bf2
BLAKE2b-256 cb61676fafd5b2bdfd8d27b556d973006aaf13d0c3ff49438fe8ef92f59e7ec7

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