Skip to main content

An immutable, memory-efficient set of integers.

Project description

frozenintset

FrozenIntSet is an immutable, memory-efficient set of integers. It fully conforms to collections.abc.Set[int] and stores values as a sorted list of non-overlapping ranges.

from frozenintset import FrozenIntSet

s = FrozenIntSet({-5, -4, -3, -2, 4, 9, 10, 20, 21, 22})

Why frozenintset?

✅ Immutable and hashable (usable as dict keys or cache keys)

✅ Efficient for both dense and sparse integer sets

✅ Fast membership testing, iteration, slicing, and set operations

✅ Supports arbitrary-size integers (no 64-bit limit)

Alternatives

intset
A highly optimized, trie-backed implementation.
⚠️ Limited to 64-bit unsigned integers only.
rangeset
Supports open and unbounded ranges and arbitrary types. More general, but frozenintset is faster for plain integers.

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

frozenintset-0.1.3.tar.gz (31.0 kB view details)

Uploaded Source

Built Distribution

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

frozenintset-0.1.3-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file frozenintset-0.1.3.tar.gz.

File metadata

  • Download URL: frozenintset-0.1.3.tar.gz
  • Upload date:
  • Size: 31.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for frozenintset-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6a73870e0187b6ad5dc00aec35312893a60389f36964a850caffc5e83dfb7f27
MD5 ca851387ab3274f317ce6d72ff5a7fb1
BLAKE2b-256 90a9df9498b613bda7990c674ee51d819b94d9d369f128bab7dfc233fc57150d

See more details on using hashes here.

Provenance

The following attestation bundles were made for frozenintset-0.1.3.tar.gz:

Publisher: python-publish.yml on scravy/frozenintset

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file frozenintset-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: frozenintset-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for frozenintset-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f6e4015d7e600ce7ece8492383d07d0c6ee134eae0960f0019df786d9085d14e
MD5 6dad0efefb03f863dc949415ce335162
BLAKE2b-256 51ce80a8f64c2f1593475e30de06b550b087339c1936a8cdd4dc0d4d837b95e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for frozenintset-0.1.3-py3-none-any.whl:

Publisher: python-publish.yml on scravy/frozenintset

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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