$npx skillfedfor your agent

bidict

The bidirectional mapping library for Python.

Worth itPyPI Released Feb 202429.9M downloads / moMPL 2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — bidict-0.23.1-py3-none-any.whl
v0.23.1 · released 2024-02-18 · Python >=3.8

Yes. bidict solves a real problem (maintaining two-way mappings) with a mature, zero-dependency implementation. It's widely used in production, actively maintained, has no known vulnerabilities, and integrates seamlessly into any Python project. The copyleft license is standard for libraries and poses no practical barrier for most use cases.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction: pure Python with no runtime dependencies outside the standard library, distributed as a wheel.
  • Actively maintained since 2014 with recent commits.

License · maintenance · safety

MPL 2.0 (copyleft) — Copyleft license (MPL 2.0) requires derivative works to be distributed under the same license; acceptable for most internal use but imposes obligations if you modify and redistribute the code.

last release 2024-02-18 (908 days) · last repo commit 2026-07-20 · 1,584 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 29,879,393 downloads/mo, #808 on PyPI

Verify before relying

pip install bidict

from bidict import bidict
element_by_symbol = bidict({'H': 'hydrogen'})
print(element_by_symbol['H'])  # 'hydrogen'
print(element_by_symbol.inverse['hydrogen'])  # 'H'
  • Whether the inverse mapping is automatically kept in sync during concurrent modifications or if external synchronization is needed.
  • Performance characteristics for very large bidicts (memory overhead, lookup speed scaling).
Same gist for agents: .md · .json

What it is and what it does

bidict is a Python library that implements a bidirectional dictionary—a data structure that maintains a consistent mapping in both directions simultaneously. When you create a bidict with key-value pairs, you can look up values by key (like a normal dict) and also access the inverse mapping to look up keys by value. The inverse is always kept in sync; modifying one direction automatically updates the other.

It's designed for scenarios where you need reliable two-way lookups without manually maintaining separate data structures. The library has no external runtime dependencies, is fully type-hinted, and has been in production use since 2009 by organizations including Google, Venmo, and CERN. It's actively maintained and covers all current Python versions.

Use it for

  • Symbol-to-name mappings (e.g., element symbols to element names) where you need fast lookup in both directions.
  • ID translation layers (e.g., internal IDs to external IDs) in APIs or database systems.
  • Enum-like structures where you need to map codes to descriptions and descriptions back to codes.
  • Configuration key aliasing where you want to support multiple names for the same setting.
  • Language or encoding tables where you need to convert between two equivalent representations.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

bidict solves a real problem (maintaining two-way mappings) with a mature, zero-dependency implementation. It's widely used in production, actively maintained, has no known vulnerabilities, and integrates seamlessly into any Python project. The copyleft license is standard for libraries and poses no practical barrier for most use cases.

Install

bidict on PyPI

Before you install

Low friction: pure Python with no runtime dependencies outside the standard library, distributed as a wheel. Actively maintained since 2014 with recent commits.

License in practice

Copyleft license (MPL 2.0) requires derivative works to be distributed under the same license; acceptable for most internal use but imposes obligations if you modify and redistribute the code.

Quickstart

pip install bidict

from bidict import bidict
element_by_symbol = bidict({'H': 'hydrogen'})
print(element_by_symbol['H'])  # 'hydrogen'
print(element_by_symbol.inverse['hydrogen'])  # 'H'

Verify before relying

  • Whether the inverse mapping is automatically kept in sync during concurrent modifications or if external synchronization is needed.
  • Performance characteristics for very large bidicts (memory overhead, lookup speed scaling).

Package facts

LicenseMPL 2.0 copyleft
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 908 days since the last release
Last repo commit
First released
Downloads29,879,393 / month, #808 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)Operating System :: OS IndependentProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTyping :: Typed

Evidence: bidict-0.23.1-py3-none-any.whl

Tags

Capabilities
bidirectional dictionarytwo-way mappingreverse lookup dictbimap pythoninverse mappingsymmetric dictionary
Topics
data-structuresmapping
PyPI keywords
bidictbimapbidirectionaldictdictionarymappingcollections

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “bidirectional dictionary”

  • bidictProvides a bidirectional dictionary (bidict) that maintains a…
  • python-socketioPython implementation of Socket.IO realtime client and server for…
  • collections-extendedProvides four specialized collection types—bag (multiset), setlist…

Give your agent the search over MCP, or paste the wish link into any chat.

Similar packages

sphinxcontrib-redoc Skip
PyPI · Documentation · released Apr 2020

A Sphinx extension that embeds OpenAPI specifications rendered with ReDoc directly into Sphinx documentation sites.

BSD-3-Clausebuilds from sourcedormant
488.6Kdownloads / mo
sphinx-reredirects With conditions
PyPI · Utilities · released Dec 2025

Sphinx extension that generates HTML redirect pages with meta refresh tags when you rename or move documentation files, preventing 404 errors without server-side configuration.

license unclearpure Python · 3.11+
894.0Kdownloads / mo
python-bidi Worth it
PyPI · Text Processing · released Jun 2026

Converts bidirectional text (mixed left-to-right and right-to-left scripts) into display order for rendering, with both Python and Rust implementations available.

Install it if you need to display bidirectional text; the LGPL license is standard for text-processing libraries and poses no barrier for most projects.

copyleftcompiled wheel · 3.9+
11.3Mdownloads / mo
keyrings.alt With conditions
PyPI · Cryptography · released Aug 2024

Provides alternate keyring backend implementations for the keyring package, including plaintext and other non-standard credential storage methods.

Install only if you have a specific need for an alternate backend and accept responsibility for the security implications.

MITpure Python · 3.8+
3.9Mdownloads / mo
sphinx_external_toc With conditions
PyPI · Python Modules · released Jan 2026

A Sphinx extension that defines documentation site-maps in a single YAML file using a top-down approach, instead of scattered toctree directives throughout source files.

MITpure Python · 3.9+
253.6Kdownloads / mo
sphinxcontrib-openapi With conditions
PyPI · Documentation · released Feb 2026

Sphinx extension that renders OpenAPI (Swagger) specifications into formatted API documentation using the HTTP domain.

BSD-3-Clausepure Python · 3.10+aging
320.3Kdownloads / mo

See also Pallets-Sphinx-Themes · transliterate · zict · breathe