The PyMongo team is pleased to announce the 1.9.1 release of PyMongoCrypt - the Python bindings for libmongocrypt. This release adds support for:
- Add support for named KMS providers like “local:name1”. This feature enables more than 1 KMS provider per type and requires libmongocrypt >= 1.9.0. See PYTHON-4172 and PYTHON-4112.
- Use libmongocrypt native crypto when available which results in 10-50x better encryption/decryption performance.**
- Bundle the crypto-enabled libmongocrypt builds in macOS and Windows wheels for better performance.
- Bundle libmongocrypt 1.9.0 in release wheels.
**Users are encouraged to upgrade to pymongocrypt >= 1.9 to see the perf benefit. Linux users need to also manually install the appropriate libmongocrypt build for their platform and set the PYMONGOCRYPT_LIB
env var to the crypto enabled SO file (ie use "<dir>/lib/libmongocrypt.so"
instead of "<dir>/nocrypto/lib/libmongocrypt.so"
). See the Installation guide. For example for Ubuntu 22.04 x86_64:
$ # Set PYMONGOCRYPT_LIB for Ubuntu 22.04 x86_64:
$ export PYMONGOCRYPT_LIB=$(pwd)/libmongocrypt-all/ubuntu2204-64/lib/libmongocrypt.so
$ python -c "import pymongocrypt; print(pymongocrypt.libmongocrypt_version())"
1.9.0
$ # Check that native crypto is enabled for better performance:
$ python -c 'from pymongocrypt.binding import lib;print(lib.mongocrypt_is_crypto_available())'
True
To check if your install is using native crypto:
$ # Check that native crypto is enabled for better performance:
$ python -c 'from pymongocrypt.binding import lib;print(lib.mongocrypt_is_crypto_available())'
True
See the changelog for the complete list of resolved issues.