serp-structs
Data-structure helpers written in the Serpentine subset.
API
- Min-heap on
list[int]:heap_push(h, v),heap_pop(h)(raisesIndexErrorwhen empty),heapify(h). - Bisect on sorted
list[int]:bisect_left(xs, v),bisect_right(xs, v),insort(xs, v). Deque[T]— generic two-stack deque (Deque([], [])to construct):push_left/push_right(move(v)),pop_left/pop_right()(raiseIndexErrorwhen empty),size(),is_empty().- Counter helpers:
count_items(list[str]) -> dict[str, int],increment(d, key, by=1),most_common(d, n)—(key, count)tuples, count descending, ties by key ascending;n < 0returns all.
Heap and bisect are int-first per the roadmap (generic comparisons need protocol-bounded ordering, which the language does not have yet).
Install
serp add serp-structs
pip install serp-structs
Metadata
Release files for serp-structs 0.1.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 | |
|---|---|---|---|
| serp_structs-0.1.0.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| serp_structs-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.4 kB
Release files / serp_structs-0.1.0.tar.gz
| Download URL | serp_structs-0.1.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5b10c36b94260877b11de952018bd05d30323094f51ce51f56cd321c5026696f
|
|
BLAKE2b-256 checksum How to use checksums |
b69a08b7b14174cd71298615d5d01e028743b7685392ded283ed5151f9cb640d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logRelease files / serp_structs-0.1.0-py3-none-any.whl
| Download URL | serp_structs-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0c4d69a4142f4058d29990a21744fa5d105549ff1e14f7137bdedc0f0e5a4e19
|
|
BLAKE2b-256 checksum How to use checksums |
3b986e0fcc1315ce56aca86b76ac57bc2bdcea9147c558cdc1076f2a3bd0ca32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency log