{"name":"bidict: The Bidirectional Mapping Library for Python","description":"bidict is a mature and lightweight Python library designed for creating bidirectional mappings. It provides familiar, Pythonic APIs for safe, simple, and flexible data handling, making it a reliable choice for projects requiring efficient two-way lookups. Trusted by major organizations since 2009, bidict ensures robust and well-tested functionality.","github":"https://github.com/jab/bidict","url":"https://osrepos.com/repo/jab-bidict","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/jab-bidict","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/jab-bidict.md","json":"https://osrepos.com/repo/jab-bidict.json","topics":["bidict","bimap","data-structures","python","python-library","mapping","two-way-dict"],"keywords":["bidict","bimap","data-structures","python","python-library","mapping","two-way-dict"],"stars":null,"summary":"bidict is a mature and lightweight Python library designed for creating bidirectional mappings. It provides familiar, Pythonic APIs for safe, simple, and flexible data handling, making it a reliable choice for projects requiring efficient two-way lookups. Trusted by major organizations since 2009, bidict ensures robust and well-tested functionality.","content":"## Introduction\nbidict is a robust Python library that provides bidirectional mapping capabilities, allowing you to easily look up values by keys and keys by values. Since its inception in 2009, it has been a trusted solution, relied upon by major organizations like Google, Venmo, CERN, Baidu, and Tencent for their data structure needs.\n\n## Installation\nTo get started with bidict, simply install it using pip:\n\nbash\npip install bidict\n\n\n## Examples\nHere's a quick example to demonstrate bidict's core functionality:\n\npython\nfrom bidict import bidict\n\nelement_by_symbol = bidict({'H': 'hydrogen'})\nprint(element_by_symbol['H'])\nprint(element_by_symbol.inverse['hydrogen'])\n\n\n## Why Use bidict?\nbidict stands out for several reasons:\n\n*   **Mature and Trusted:** With over a decade of development, it's a proven solution used by leading companies.\n*   **Pythonic APIs:** Designed for safety, simplicity, flexibility, and ergonomics, making it intuitive for Python developers.\n*   **Lightweight:** It has no runtime dependencies beyond Python's standard library.\n*   **High Quality Code:** Implemented in concise, fully type-hinted Python, optimized for efficiency and long-term stability.\n*   **Extensive Documentation:** Comprehensive documentation is available to help you get the most out of the library.\n*   **100% Test Coverage:** Ensures reliability across all supported Python versions, including property-based tests and benchmarks.\n\n## Links\nFor more information, documentation, and to contribute, check out these official links:\n\n*   [GitHub Repository](https://github.com/jab/bidict)\n*   [Official Documentation](https://bidict.readthedocs.io)\n*   [PyPI Page](https://pypi.org/project/bidict)","metrics":{"detailViews":3,"githubClicks":15},"dates":{"published":null,"modified":"2026-04-05T23:13:08.000Z"}}