bidict
The bidirectional mapping library for Python
Depended on by Google, Venmo, CERN, Baidu, Tencent, and teams across the world since 2009. Familiar, Pythonic APIs that are carefully designed for safety, simplicity, flexibility, and ergonomics. Lightweight, with no runtime dependencies outside Python's standard library. Implemented in concise, well-factored, fully type-hinted Python code that is optimized for running efficiently as well as for long-term maintenance and stability. Extensively documented. 100% test coverage running continuously across all supported Python versions. Enterprise-level support for bidict can be obtained via the Tidelift subscription. One of the best things about bidict is that it touches a surprising number of interesting Python corners, especially given its small size and scope. Choose a tier and GitHub handles everything else. Your GitHub sponsorship will automatically go on the same bill you already have set up with GitHub, so after the one-click signup, there’s nothing else to do.