--- id: pymongocrypt version: "1.18.1" license: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) license_treatment: permissive maintenance: active --- # pymongocrypt — Python bindings for libmongocrypt License: permissive · Maintenance: active · Downloads: 1.3M/mo ## What it is and what it does PyMongoCrypt is a Python wrapper around libmongocrypt that implements client-side field-level encryption (CSFLE) for MongoDB. It uses cffi to bind to the native libmongocrypt library and cryptography for cryptographic operations, allowing developers to encrypt sensitive data on the client before sending it to MongoDB. The package is designed to integrate with MongoDB drivers to provide transparent encryption at the field level. It ships pre-built wheels for macOS, Windows, and manylinux platforms that include an embedded libmongocrypt build, reducing setup friction. For source installations or older pip versions, you must manually install libmongocrypt and point PyMongoCrypt to it via the PYMONGOCRYPT_LIB environment variable. The package supports modern Python versions and is actively maintained by MongoDB. Use it for: - Encrypt sensitive fields in MongoDB documents before transmission to comply with data protection regulations. - Implement field-level encryption in MongoDB driver applications without modifying application-level encryption logic. - Integrate client-side encryption into PyMongo or other MongoDB drivers for automatic field encryption/decryption. - Protect personally identifiable information (PII) or financial data stored in MongoDB with transparent client-side encryption. - Build multi-tenant applications where each tenant's data is encrypted with tenant-specific keys. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. PyMongoCrypt provides Python bindings for libmongocrypt, enabling client-side encryption for MongoDB drivers through cffi and cryptography. Yes, if you need client-side encryption for MongoDB. The package is production-stable, actively maintained, and has no known vulnerabilities. Install friction is moderate due to libmongocrypt dependency, but pre-built wheels eliminate most setup overhead on common platforms. Apache 2.0 licensing poses no restrictions. Verify that your platform is supported by the pre-built wheels or plan for manual libmongocrypt installation. ## Install pip install pymongocrypt uv add pymongocrypt poetry add pymongocrypt ## Installing pymongocrypt Before you install: Medium install friction due to platform-specific wheels (macOS, Windows, manylinux) and a compiled dependency on libmongocrypt. Wheels are provided for common platforms, but source installation requires manual libmongocrypt setup. Package is actively maintained with recent releases. License in practice: Apache License 2.0 is permissive; you may use, modify, and distribute this package freely in commercial and open-source projects, provided you include a copy of the license and document any changes. Quickstart: pip install pymongocrypt import pymongocrypt print(pymongocrypt.libmongocrypt_version()) libmongocrypt must be installed on your system or available via PYMONGOCRYPT_LIB environment variable; wheel installations on macOS, Windows, and manylinux include an embedded build, but source installs require manual setup. Verify before relying: - Whether the package works with PyPy3.9+ as stated in the description (classifiers only list CPython and PyPy, but no specific PyPy version bounds). - Performance characteristics of the embedded libmongocrypt build versus a system-installed build. ## Package facts - License: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 1.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags mongodb client-side encryption, pymongo encryption bindings, libmongocrypt python wrapper, mongodb csfle support, encrypted mongodb driver, mongo field-level encryption, client-side field encryption, encryption, mongodb, csfle [View on SkillFed](https://skillfed.io/packages/pymongocrypt) · [View on PyPI](https://pypi.org/project/pymongocrypt/)