frozndict 2.0.0

🧊 A memory-efficient, fully immutable dictionary for Python, powered by Rust.
Documentation
  • Coverage
  • 100%
    43 out of 43 items documented11 out of 40 items with examples
  • Size
  • Source code size: 58.01 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 868.62 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 17s Average build duration of successful builds.
  • all releases: 18s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • wiseaidev

frozndict

A memory-efficient, fully immutable dictionary for Python, powered by Rust.

Overview

frozndict provides a zero-overhead, hashable, immutable mapping type that can be used wherever a frozen alternative to Python's built-in dict is needed.

The core data structure, [frozen_map::FrozenMap], stores entries in a single sorted heap allocation. Lookups run in O(log n) via binary search; the hash is computed once at construction and cached, making repeated hash() calls O(1).

The Python class [python::FrozenDict] wraps [frozen_map::FrozenMap] and is exposed to Python as the FrozenDict (and its frozendict alias) type.

Modules

  • [frozen_map] - The core Rust data structure.
  • [python] - PyO3 Python bindings (gated on the python feature flag).