Skip to main content

heapq-container

PyPI Tests Changelog License

a Container datatype wrapper for the Python standard library heapq module.

Installation

Install this library using pip:

pip install heapq-container

Usage

from heapqueue import HeapQueue

 def heapsort(iterable):
    h = HeapQueue(iterable)
    return [h.pop() for _ in range(len(h))]

heapsort([1, 3, 5, 7, 9, 2, 4, 6, 8, 0])
# -> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

Development

To contribute to this library, first checkout the code. Then create a new virtual environment:

cd heapq-container
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

Release files for heapq-container 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for heapq-container 0.1
File Size Uploaded
heapq_container-0.1.tar.gz 7.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for heapq-container 0.1
File Interpreter ABI Platform
heapq_container-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.4 kB

Release files / heapq_container-0.1.tar.gz

Download URL heapq_container-0.1.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0e8ebc584e0ceec1ce84b082702e39ea10e4ab50334523ae846a17d93911552a
BLAKE2b-256 checksum
How to use checksums
14227f7132a59c746e9e6b27148ea4f7f166618bbd71991458a922713eae3b42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / heapq_container-0.1-py3-none-any.whl

Download URL heapq_container-0.1-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f4b07fa28f55c8f0e946e57027004d52f8b9b151b28488d187d005d8dd0047c
BLAKE2b-256 checksum
How to use checksums
2a7bfb0256f4f819310fb175e83411b0ff73ab8938bfc4b8da692f27b4d2b62f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page