--- id: lmdb version: "2.3.0" license: OLDAP-2.8 license_treatment: unclear maintenance: active --- # lmdb — Universal Python binding for the LMDB 'Lightning' Database License: unclear · Maintenance: active · Downloads: 4.8M/mo ## What it is and what it does py-lmdb is a Python wrapper around the LMDB C library, a high-performance embedded key-value database that uses memory-mapped files for fast, efficient access. It allows you to store and retrieve binary data with ACID transaction support, making it suitable for applications that need a lightweight, durable local database without the overhead of a server process. The package has been maintained since 2013 and currently supports Python 3.9 and later, including PyPy. It provides no runtime dependencies beyond the compiled LMDB library itself, so installation is straightforward on platforms with pre-built wheels. The library is commonly used in data-intensive applications, caching layers, and scenarios where you need fast, transactional access to structured data without running a separate database service. Use it for: - Building a local cache layer for machine learning pipelines or data processing workflows that need fast key-value lookups. - Storing embeddings or feature vectors in a searchable, persistent format for similarity search or retrieval tasks. - Implementing a lightweight session store or state management system for applications that don't require a full database server. - Archiving or indexing large datasets where memory-mapped access provides performance benefits over traditional file I/O. - Creating a transaction-safe local database for desktop or embedded applications with minimal external dependencies. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a Python binding to LMDB (Lightning Memory-Mapped Database), a fast key-value store based on memory-mapped files for efficient data access and storage. Yes, if you need a fast, embedded key-value database with transaction support and have Python >= 3.9. The package is actively maintained, has no known vulnerabilities, and offers pre-built wheels for most platforms. Verify that the OLDAP-2.8 license is compatible with your use case before committing to production use. ## Install pip install lmdb uv add lmdb poetry add lmdb ## Installing lmdb Before you install: Medium install friction due to compiled C extension wheels, but pre-built wheels are available for common platforms (macOS, Linux, Windows) and Python versions 3.10–3.13. Last release 33 days ago; repository is active with 747 stars. License in practice: License treatment is unclear (OLDAP-2.8); review the repository's license file and terms before use in proprietary or redistributed software to confirm compatibility with your project. Quickstart: import lmdb env = lmdb.open('/path/to/db') with env.begin(write=True) as txn: txn.put(b'key', b'value') with env.begin() as txn: print(txn.get(b'key')) Requires Python >= 3.9; compiled C extension requires a C compiler or pre-built wheel for your platform. Verify before relying: - Specific performance characteristics (throughput, latency, memory overhead) compared to other embedded databases. - Whether OLDAP-2.8 license is compatible with your intended use case (proprietary, commercial, or open-source redistribution). - Concurrency model and transaction isolation guarantees under multi-process or multi-threaded access patterns. ## Package facts - License: OLDAP-2.8 (unclear) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 4.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags lmdb python binding, key-value database, memory-mapped database, fast embedded database, lightning database python, persistent key-value store, embedded database engine, embedded-database, key-value-store, memory-mapped [View on SkillFed](https://skillfed.io/packages/lmdb) · [View on PyPI](https://pypi.org/project/lmdb/)