--- id: bidict version: "0.23.1" license: MPL 2.0 license_treatment: copyleft maintenance: active --- # bidict — The bidirectional mapping library for Python. License: copyleft · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install bidict uv add bidict poetry add bidict ## Description .. role:: doc .. (Forward declaration for the "doc" role that Sphinx defines for interop with renderers that are often used to show this doc and that are unaware of Sphinx (GitHub.com, PyPI.org, etc.). Use :doc: rather than :ref: here for better interop as well.) bidict ====== *The bidirectional mapping library for Python.* Status ------ .. image:: https://img.shields.io/pypi/v/bidict.svg :target: https://pypi.org/project/bidict :alt: Latest release .. image:: https://img.shields.io/readthedocs/bidict/main.svg :target: https://bidict.readthedocs.io/en/main/ :alt: Documentation .. image:: https://github.com/jab/bidict/actions/workflows/test.yml/badge.svg :target: https://github.com/jab/bidict/actions/workflows/test.yml?query=branch%3Amain :alt: GitHub Actions CI status .. image:: https://img.shields.io/pypi/l/bidict.svg :target: https://raw.githubusercontent.com/jab/bidict/main/LICENSE :alt: License .. image:: https://static.pepy.tech/badge/bidict :target: https://pepy.tech/project/bidict :alt: PyPI Downloads .. image:: https://img.shields.io/badge/GitHub-sponsor-ff69b4 :target: https://github.com/sponsors/jab :alt:... ## AI interpretation — verify before relying bidict provides a bidirectional dictionary data structure that maintains consistent forward and inverse mappings, allowing you to look up keys by values and values by keys with equal efficiency. Verdict: bidict is a mature, well-maintained library (active since 2009, top 1000 PyPI packages) with zero known vulnerabilities, no external dependencies, and full type hints. The MPL 2.0 copyleft license requires compliance with source-code and modification-disclosure terms. Suitable for production use where bidirectional mapping is needed. [View on SkillFed](https://skillfed.io/packages/bidict) · [View on PyPI](https://pypi.org/project/bidict/)