This library provides a flexible Python implementation of red-black trees, offering a low standard deviation in operation times for insertion, deletion, and lookup. It includes modules for both set-like (enforcing uniqueness) and dictionary-like use. The library is known to work across CPython 2.x, CPython 3.x, PyPy, and Jython. The current version is 1.22, with an infrequent release cadence; the last major update was in December 2023.
pip install red-black-tree-modVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic dictionary-like usage, including insertion, lookup, iteration (keys are sorted), and deletion.
Review the PyPI release notes for version 1.21 and later for any unstated behavioral changes. Thoroughly test existing code when upgrading from versions prior to 1.21.
Examine the installed package contents (e.g., `pip show red-black-tree-mod` and explore the source) to identify the correct module for set-like functionality if `red_black_dict_mod` does not suit your needs.
Evaluate performance requirements. If absolute maximum performance for sorted collections is critical, consider benchmarking against or migrating to libraries like `SortedContainers`.
No dependency data recorded yet.