Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A Pythonic indexed priority queue

Project Description

A priority queue dictionary maps hashable objects (keys) to priority-determining values. It provides a hybrid dictionary/priority queue API.

Works with Python 2.7+, 3.3+, and PyPy.

The priority queue is implemented as a binary heap of (key, priority value) pairs, which supports:

  • O(1) search for the item with highest priority
  • O(log n) removal of the item with highest priority
  • O(log n) insertion of a new item

Additionally, an index maps elements to their location in the heap and is kept up to date as the heap is manipulated. As a result, pqdict also supports:

  • O(1) lookup of any item by key
  • O(log n) removal of any item
  • O(log n) updating of any item’s priority level

Documentation

Documentation is available at http://pqdict.readthedocs.org/en/latest/.

License

This module is released under the MIT license. The augmented heap implementation was adapted from the heapq module in the Python standard library, which was written by Kevin O’Connor and augmented by Tim Peters and Raymond Hettinger.

Release History

Release History

This version
History Node

1.0.0

History Node

0.5

History Node

0.4

History Node

0.3

History Node

0.2

History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pqdict-1.0.0-py2.py3-none-any.whl (8.3 kB) Copy SHA256 Checksum SHA256 3.4 Wheel Sep 2, 2015
pqdict-1.0.0.tar.gz (82.0 kB) Copy SHA256 Checksum SHA256 Source Sep 2, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting