jab/bidict
The bidirectional mapping library for Python. observed · 2026-08-28
Health v2 · maintenance only
99/100
- Activity 99
- Release rhythm 99
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 0
- age_days: 4362
- days_rel: 8
- days_push: 8
- n_releases_24m: 2
Adoption not part of the score
1586 stars · 69 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
bidict is a Python library providing efficient, type-hinted bidirectional mapping data structures where both keys and values can be looked up. It offers Pythonic dict-like APIs with an .inverse property, is dependency-free, and has been maintained since 2009.
Use cases
- maintain a two-way lookup between ids and names in Python
- map enum values to labels and back
- invert a dictionary efficiently while keeping both directions in sync
- look up keys by value like a reverse dict
- store symbol-to-element and element-to-symbol mappings
- enforce one-to-one relationships between two sets of values
When to choose
- you need both key->value and value->key lookups kept automatically in sync
- you want a mature, well-tested, zero-dependency Python library
- you need type-hinted, dict-like APIs with safety guarantees against duplicate values
When to avoid
- you only need a one-time inversion of a dict (use {v: k for k, v in d.items()})
- your mappings are not one-to-one and you need multi-mapping semantics
- you are not working in Python
Facets
library · maturity stable
serialization developer-tools python cross-platform bidirectional-map bimap data-structures dictionary collections algorithms
2 sources
- readme: https://github.com/jab/bidict · fetched 2026-08-28 · 3a002d0dab1e
- registry_pypi: https://pypi.org/pypi/bidict/json · fetched 2026-08-29 · 7dcc1efe6e1d
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| jab/bidict | main | 99 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem