pymongocrypt


Namepymongocrypt JSON
Version 1.10.1 PyPI version JSON
download
home_pageNone
SummaryPython bindings for libmongocrypt
upload_time2024-07-01 12:32:32
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseApache 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 use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
keywords bson mongo mongocrypt mongodb pymongo pymongocrypt
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ============
PyMongoCrypt
============
:Info: Python bindings for libmongocrypt. See
       `GitHub <https://github.com/mongodb/libmongocrypt/tree/master/bindings/python>`_
       for the latest source.
:Author: Shane Harvey

About
=====

Python wrapper library for libmongocrypt that supports client side encryption
in drivers. PyMongoCrypt uses `cffi <https://pypi.org/project/cffi/>`_ and
`cryptography <https://pypi.org/project/cryptography/>`_.

PyMongoCrypt supports Python 3.8+ and PyPy3.9+.

Support / Feedback
==================

For issues with, questions about, or feedback for PyMongoCrypt, please look into
our `support channels <http://www.mongodb.org/about/support>`_. Please
do not email any of the PyMongoCrypt developers directly with issues or
questions - you're more likely to get an answer on the `mongodb-user
<http://groups.google.com/group/mongodb-user>`_ list on Google Groups.

Bugs / Feature Requests
=======================

Think you’ve found a bug? Want to see a new feature in PyMongoCrypt?
Please open a case in our issue management tool, JIRA:

- `Create an account and login <https://jira.mongodb.org>`_.
- Navigate to `the PYTHON project <https://jira.mongodb.org/browse/PYTHON>`_.
- Click **Create Issue** - Please provide as much information as possible about the issue type and how to reproduce it.

Bug reports in JIRA for all driver projects (i.e. PYTHON, CSHARP, JAVA) and the
Core Server (i.e. SERVER) project are **public**.

How To Ask For Help
-------------------

Please include all of the following information when opening an issue:

- Detailed steps to reproduce the problem, including full traceback, if possible.
- The exact python version used, with patch level::

  $ python -c "import sys; print(sys.version)"

- The exact version of PyMongoCrypt used::

  $ python -c "import pymongocrypt; print(pymongocrypt.__version__)"

- The exact version of libbmongocrypt used by PyMongoCrypt::

  $ python -c "import pymongocrypt; print(pymongocrypt.libmongocrypt_version())"

- The exact version of PyMongo used (if applicable), with patch level::

  $ python -c "import pymongo; print(pymongo.version); print(pymongo.has_c())"

- The operating system and version (e.g. Windows 7, OSX 10.8, ...)
- Web framework or asynchronous network library used, if any, with version (e.g.
  Django 1.7, mod_wsgi 4.3.0, gevent 1.0.1, Tornado 4.0.2, ...)

Security Vulnerabilities
------------------------

If you've identified a security vulnerability in a driver or any other
MongoDB project, please report it according to the `instructions here
<http://docs.mongodb.org/manual/tutorial/create-a-vulnerability-report>`_.

Installation
============

PyMongoCrypt can be installed with `pip <http://pypi.python.org/pypi/pip>`_::

  $ python -m pip install pymongocrypt
  $ python -c "import pymongocrypt; print(pymongocrypt.libmongocrypt_version())"
  1.9.0


PyMongoCrypt ships wheels for macOS, Windows, and manylinux2010 that include
an embedded libmongocrypt build.

Installing from wheels on Linux requires pip 19 or later because it adds
`support for manylinux2010 wheels <https://pip.pypa.io/en/stable/news/#id108>`_.
Older versions of pip will attempt installation using the
pymongocrypt-X.Y.tar.gz source distribution which requires the extra step of
downloading and installing libmongocrypt as described below.
Users can upgrade to pip 19 by running::

  $ python -m pip install --upgrade 'pip>=19'

Installing from source
----------------------

Installing from source (or the pymongocrypt-X.Y.tar.gz source distribution,
or pip < 19 on Linux) requires an extra step of installing libmongocrypt.
First, install PyMongoCrypt from source::

  $ git clone git@github.com:mongodb/libmongocrypt.git
  $ python -m pip install ./libmongocrypt/bindings/python

Next, install libmongocrypt:

Installing libmongocrypt
^^^^^^^^^^^^^^^^^^^^^^^^

libmongocrypt is continuously built and published on evergreen.
The latest tarball containing libmongocrypt built on all supported variants is
`published here <https://s3.amazonaws.com/mciuploads/libmongocrypt/all/master/latest/libmongocrypt-all.tar.gz>`_.
Download and extract ``libmongocrypt-all.tar.gz`` and set
``PYMONGOCRYPT_LIB`` to the path to your operating system's libmongocrypt.so file.
For example::

  $ curl -O https://s3.amazonaws.com/mciuploads/libmongocrypt/all/master/latest/libmongocrypt-all.tar.gz
  $ mkdir libmongocrypt-all && tar xzf libmongocrypt-all.tar.gz -C libmongocrypt-all
  $ ls libmongocrypt-all
  amazon2             debian92            rhel-80-64-bit      rhel72-zseries-test ubuntu1804-arm64
  amazon2-arm64       linux-64-amazon-ami rhel-81-ppc64el     suse12-64           ubuntu2004-64
  amazon2023          macos               rhel-82-arm64       suse15-64           ubuntu2004-arm64
  amazon2023-arm64    rhel-62-64-bit      rhel-83-zseries     ubuntu1604          ubuntu2204-64
  debian10            rhel-70-64-bit      rhel-91-64-bit      ubuntu1604-arm64    ubuntu2204-arm64
  debian11            rhel-71-ppc64el     rhel-91-arm64       ubuntu1804-64       windows-test

macOS::

  $ # Set PYMONGOCRYPT_LIB for macOS:
  $ export PYMONGOCRYPT_LIB=$(pwd)/libmongocrypt-all/macos/lib/libmongocrypt.dylib
  $ python -c "import pymongocrypt; print(pymongocrypt.libmongocrypt_version())"
  1.9.0

Windows::

  $ # Set PYMONGOCRYPT_LIB for Windows:
  $ chmod +x $(pwd)/libmongocrypt-all/windows-test/bin/mongocrypt.dll
  $ export PYMONGOCRYPT_LIB=$(pwd)/libmongocrypt-all/windows-test/bin/mongocrypt.dll
  $ python -c "import pymongocrypt; print(pymongocrypt.libmongocrypt_version())"
  1.9.0

Linux: set the libmongocrypt build for your platform, 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

Note if your Linux platform is not available, the generic RHEL 6.2 x86_64 "nocrypto" build
should still be compatible however the "nocrypto" build will result in lower performance
for encryption and decryption::

  $ # Set PYMONGOCRYPT_LIB for RHEL 6.2 x86_64:
  $ export PYMONGOCRYPT_LIB=$(pwd)/libmongocrypt-all/rhel-62-64-bit/nocrypto/lib64/libmongocrypt.so
  $ python -c "import pymongocrypt; print(pymongocrypt.libmongocrypt_version())"
  1.9.0
  $ python -c 'from pymongocrypt.binding import lib;print(lib.mongocrypt_is_crypto_available())'
  False

Other methods of installation (brew, rpm, yum, apt-get, deb, etc...) are documented here:
https://www.mongodb.com/docs/manual/core/csfle/reference/libmongocrypt/#linux-installation

Dependencies
============

PyMongoCrypt supports Python 3.8+ and PyPy3.9+.

PyMongoCrypt requires `cffi <https://pypi.org/project/cffi/>`_ and
`cryptography <https://pypi.org/project/cryptography/>`_.

If not installed using one of the official wheels, PyMongoCrypt also requires
libmongocrypt to be installed on your system. If libmongocrypt is not
installed you will see an error like this:

.. code-block:: python

  >>> import pymongocrypt
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "pymongocrypt/__init__.py", line 15, in <module>
      from pymongocrypt.binding import libmongocrypt_version, lib
    File "pymongocrypt/binding.py", line 803, in <module>
      lib = ffi.dlopen(os.environ.get('PYMONGOCRYPT_LIB', 'mongocrypt'))
    File "/.../lib/python3.8/site-packages/cffi/api.py", line 146, in dlopen
      lib, function_cache = _make_ffi_library(self, name, flags)
    File "/.../lib/python3.8/site-packages/cffi/api.py", line 828, in _make_ffi_library
      backendlib = _load_backend_lib(backend, libname, flags)
    File "/.../lib/python3.8/site-packages/cffi/api.py", line 823, in _load_backend_lib
      raise OSError(msg)
  OSError: ctypes.util.find_library() did not manage to locate a library called 'mongocrypt'


Use the ``PYMONGOCRYPT_LIB`` environment variable to load a locally installed
libmongocrypt build without relying on platform specific library path environment
variables, like ``LD_LIBRARY_PATH``. For example::

  $ export PYMONGOCRYPT_LIB='/path/to/libmongocrypt.so'
  $ python -c "import pymongocrypt; print(pymongocrypt.libmongocrypt_version())"
  1.9.0

Testing
=======

The easiest way to run the tests is to run **python setup.py test** in
the root of the distribution.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pymongocrypt",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "bson, mongo, mongocrypt, mongodb, pymongo, pymongocrypt",
    "author": null,
    "author_email": "Shane Harvey <mongodb-user@googlegroups.com>",
    "download_url": "https://files.pythonhosted.org/packages/0b/94/8d03061c0721264f97e3b8f87a56f57aa74a4128038705bb131e0e657993/pymongocrypt-1.10.1.tar.gz",
    "platform": null,
    "description": "============\nPyMongoCrypt\n============\n:Info: Python bindings for libmongocrypt. See\n       `GitHub <https://github.com/mongodb/libmongocrypt/tree/master/bindings/python>`_\n       for the latest source.\n:Author: Shane Harvey\n\nAbout\n=====\n\nPython wrapper library for libmongocrypt that supports client side encryption\nin drivers. PyMongoCrypt uses `cffi <https://pypi.org/project/cffi/>`_ and\n`cryptography <https://pypi.org/project/cryptography/>`_.\n\nPyMongoCrypt supports Python 3.8+ and PyPy3.9+.\n\nSupport / Feedback\n==================\n\nFor issues with, questions about, or feedback for PyMongoCrypt, please look into\nour `support channels <http://www.mongodb.org/about/support>`_. Please\ndo not email any of the PyMongoCrypt developers directly with issues or\nquestions - you're more likely to get an answer on the `mongodb-user\n<http://groups.google.com/group/mongodb-user>`_ list on Google Groups.\n\nBugs / Feature Requests\n=======================\n\nThink you\u2019ve found a bug? Want to see a new feature in PyMongoCrypt?\nPlease open a case in our issue management tool, JIRA:\n\n- `Create an account and login <https://jira.mongodb.org>`_.\n- Navigate to `the PYTHON project <https://jira.mongodb.org/browse/PYTHON>`_.\n- Click **Create Issue** - Please provide as much information as possible about the issue type and how to reproduce it.\n\nBug reports in JIRA for all driver projects (i.e. PYTHON, CSHARP, JAVA) and the\nCore Server (i.e. SERVER) project are **public**.\n\nHow To Ask For Help\n-------------------\n\nPlease include all of the following information when opening an issue:\n\n- Detailed steps to reproduce the problem, including full traceback, if possible.\n- The exact python version used, with patch level::\n\n  $ python -c \"import sys; print(sys.version)\"\n\n- The exact version of PyMongoCrypt used::\n\n  $ python -c \"import pymongocrypt; print(pymongocrypt.__version__)\"\n\n- The exact version of libbmongocrypt used by PyMongoCrypt::\n\n  $ python -c \"import pymongocrypt; print(pymongocrypt.libmongocrypt_version())\"\n\n- The exact version of PyMongo used (if applicable), with patch level::\n\n  $ python -c \"import pymongo; print(pymongo.version); print(pymongo.has_c())\"\n\n- The operating system and version (e.g. Windows 7, OSX 10.8, ...)\n- Web framework or asynchronous network library used, if any, with version (e.g.\n  Django 1.7, mod_wsgi 4.3.0, gevent 1.0.1, Tornado 4.0.2, ...)\n\nSecurity Vulnerabilities\n------------------------\n\nIf you've identified a security vulnerability in a driver or any other\nMongoDB project, please report it according to the `instructions here\n<http://docs.mongodb.org/manual/tutorial/create-a-vulnerability-report>`_.\n\nInstallation\n============\n\nPyMongoCrypt can be installed with `pip <http://pypi.python.org/pypi/pip>`_::\n\n  $ python -m pip install pymongocrypt\n  $ python -c \"import pymongocrypt; print(pymongocrypt.libmongocrypt_version())\"\n  1.9.0\n\n\nPyMongoCrypt ships wheels for macOS, Windows, and manylinux2010 that include\nan embedded libmongocrypt build.\n\nInstalling from wheels on Linux requires pip 19 or later because it adds\n`support for manylinux2010 wheels <https://pip.pypa.io/en/stable/news/#id108>`_.\nOlder versions of pip will attempt installation using the\npymongocrypt-X.Y.tar.gz source distribution which requires the extra step of\ndownloading and installing libmongocrypt as described below.\nUsers can upgrade to pip 19 by running::\n\n  $ python -m pip install --upgrade 'pip>=19'\n\nInstalling from source\n----------------------\n\nInstalling from source (or the pymongocrypt-X.Y.tar.gz source distribution,\nor pip < 19 on Linux) requires an extra step of installing libmongocrypt.\nFirst, install PyMongoCrypt from source::\n\n  $ git clone git@github.com:mongodb/libmongocrypt.git\n  $ python -m pip install ./libmongocrypt/bindings/python\n\nNext, install libmongocrypt:\n\nInstalling libmongocrypt\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nlibmongocrypt is continuously built and published on evergreen.\nThe latest tarball containing libmongocrypt built on all supported variants is\n`published here <https://s3.amazonaws.com/mciuploads/libmongocrypt/all/master/latest/libmongocrypt-all.tar.gz>`_.\nDownload and extract ``libmongocrypt-all.tar.gz`` and set\n``PYMONGOCRYPT_LIB`` to the path to your operating system's libmongocrypt.so file.\nFor example::\n\n  $ curl -O https://s3.amazonaws.com/mciuploads/libmongocrypt/all/master/latest/libmongocrypt-all.tar.gz\n  $ mkdir libmongocrypt-all && tar xzf libmongocrypt-all.tar.gz -C libmongocrypt-all\n  $ ls libmongocrypt-all\n  amazon2             debian92            rhel-80-64-bit      rhel72-zseries-test ubuntu1804-arm64\n  amazon2-arm64       linux-64-amazon-ami rhel-81-ppc64el     suse12-64           ubuntu2004-64\n  amazon2023          macos               rhel-82-arm64       suse15-64           ubuntu2004-arm64\n  amazon2023-arm64    rhel-62-64-bit      rhel-83-zseries     ubuntu1604          ubuntu2204-64\n  debian10            rhel-70-64-bit      rhel-91-64-bit      ubuntu1604-arm64    ubuntu2204-arm64\n  debian11            rhel-71-ppc64el     rhel-91-arm64       ubuntu1804-64       windows-test\n\nmacOS::\n\n  $ # Set PYMONGOCRYPT_LIB for macOS:\n  $ export PYMONGOCRYPT_LIB=$(pwd)/libmongocrypt-all/macos/lib/libmongocrypt.dylib\n  $ python -c \"import pymongocrypt; print(pymongocrypt.libmongocrypt_version())\"\n  1.9.0\n\nWindows::\n\n  $ # Set PYMONGOCRYPT_LIB for Windows:\n  $ chmod +x $(pwd)/libmongocrypt-all/windows-test/bin/mongocrypt.dll\n  $ export PYMONGOCRYPT_LIB=$(pwd)/libmongocrypt-all/windows-test/bin/mongocrypt.dll\n  $ python -c \"import pymongocrypt; print(pymongocrypt.libmongocrypt_version())\"\n  1.9.0\n\nLinux: set the libmongocrypt build for your platform, for example for Ubuntu 22.04 x86_64::\n\n  $ # Set PYMONGOCRYPT_LIB for Ubuntu 22.04 x86_64:\n  $ export PYMONGOCRYPT_LIB=$(pwd)/libmongocrypt-all/ubuntu2204-64/lib/libmongocrypt.so\n  $ python -c \"import pymongocrypt; print(pymongocrypt.libmongocrypt_version())\"\n  1.9.0\n  $ # Check that native crypto is enabled for better performance:\n  $ python -c 'from pymongocrypt.binding import lib;print(lib.mongocrypt_is_crypto_available())'\n  True\n\nNote if your Linux platform is not available, the generic RHEL 6.2 x86_64 \"nocrypto\" build\nshould still be compatible however the \"nocrypto\" build will result in lower performance\nfor encryption and decryption::\n\n  $ # Set PYMONGOCRYPT_LIB for RHEL 6.2 x86_64:\n  $ export PYMONGOCRYPT_LIB=$(pwd)/libmongocrypt-all/rhel-62-64-bit/nocrypto/lib64/libmongocrypt.so\n  $ python -c \"import pymongocrypt; print(pymongocrypt.libmongocrypt_version())\"\n  1.9.0\n  $ python -c 'from pymongocrypt.binding import lib;print(lib.mongocrypt_is_crypto_available())'\n  False\n\nOther methods of installation (brew, rpm, yum, apt-get, deb, etc...) are documented here:\nhttps://www.mongodb.com/docs/manual/core/csfle/reference/libmongocrypt/#linux-installation\n\nDependencies\n============\n\nPyMongoCrypt supports Python 3.8+ and PyPy3.9+.\n\nPyMongoCrypt requires `cffi <https://pypi.org/project/cffi/>`_ and\n`cryptography <https://pypi.org/project/cryptography/>`_.\n\nIf not installed using one of the official wheels, PyMongoCrypt also requires\nlibmongocrypt to be installed on your system. If libmongocrypt is not\ninstalled you will see an error like this:\n\n.. code-block:: python\n\n  >>> import pymongocrypt\n  Traceback (most recent call last):\n    File \"<stdin>\", line 1, in <module>\n    File \"pymongocrypt/__init__.py\", line 15, in <module>\n      from pymongocrypt.binding import libmongocrypt_version, lib\n    File \"pymongocrypt/binding.py\", line 803, in <module>\n      lib = ffi.dlopen(os.environ.get('PYMONGOCRYPT_LIB', 'mongocrypt'))\n    File \"/.../lib/python3.8/site-packages/cffi/api.py\", line 146, in dlopen\n      lib, function_cache = _make_ffi_library(self, name, flags)\n    File \"/.../lib/python3.8/site-packages/cffi/api.py\", line 828, in _make_ffi_library\n      backendlib = _load_backend_lib(backend, libname, flags)\n    File \"/.../lib/python3.8/site-packages/cffi/api.py\", line 823, in _load_backend_lib\n      raise OSError(msg)\n  OSError: ctypes.util.find_library() did not manage to locate a library called 'mongocrypt'\n\n\nUse the ``PYMONGOCRYPT_LIB`` environment variable to load a locally installed\nlibmongocrypt build without relying on platform specific library path environment\nvariables, like ``LD_LIBRARY_PATH``. For example::\n\n  $ export PYMONGOCRYPT_LIB='/path/to/libmongocrypt.so'\n  $ python -c \"import pymongocrypt; print(pymongocrypt.libmongocrypt_version())\"\n  1.9.0\n\nTesting\n=======\n\nThe easiest way to run the tests is to run **python setup.py test** in\nthe root of the distribution.\n",
    "bugtrack_url": null,
    "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 use, reproduction, and distribution as defined by Sections 1 through 9 of this document.  \"Licensor\" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.  \"Legal Entity\" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.  \"You\" (or \"Your\") shall mean an individual or Legal Entity exercising permissions granted by this License.  \"Source\" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.  \"Object\" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.  \"Work\" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).  \"Derivative Works\" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.  \"Contribution\" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as \"Not a Contribution.\"  \"Contributor\" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.  2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.  3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.  4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:  (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and  (b) You must cause any modified files to carry prominent notices stating that You changed the files; and  (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and  (d) If the Work includes a \"NOTICE\" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.  You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.  5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.  6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.  7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.  8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.  9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.  END OF TERMS AND CONDITIONS  APPENDIX: How to apply the Apache License to your work.  To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets \"[]\" replaced with your own identifying information. (Don't include the brackets!)  The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same \"printed page\" as the copyright notice for easier identification within third-party archives.  Copyright [yyyy] [name of copyright owner]  Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.",
    "summary": "Python bindings for libmongocrypt",
    "version": "1.10.1",
    "project_urls": {
        "Homepage": "https://github.com/mongodb/libmongocrypt/tree/master/bindings/python"
    },
    "split_keywords": [
        "bson",
        " mongo",
        " mongocrypt",
        " mongodb",
        " pymongo",
        " pymongocrypt"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9afc28607a50361fb51804cbab35b283b13fb7f5d03d01165d1137e0c102c662",
                "md5": "492fc530989a1429f78f76eda1afacae",
                "sha256": "c04afb8fd790a5d0ffce6906f6c336f76050c0dc242fe94115ac9327751c3baa"
            },
            "downloads": -1,
            "filename": "pymongocrypt-1.10.1-py3-none-macosx_11_0_universal2.whl",
            "has_sig": false,
            "md5_digest": "492fc530989a1429f78f76eda1afacae",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6964326,
            "upload_time": "2024-07-01T12:32:22",
            "upload_time_iso_8601": "2024-07-01T12:32:22.455242Z",
            "url": "https://files.pythonhosted.org/packages/9a/fc/28607a50361fb51804cbab35b283b13fb7f5d03d01165d1137e0c102c662/pymongocrypt-1.10.1-py3-none-macosx_11_0_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3322ff6cada79fd5e38fa57024ccd7dfab71ec8eae2efe1657f2a30b36a5faf8",
                "md5": "c3f52995523d8c7e085cf834a9ba5136",
                "sha256": "d09fd902edec71dafce45005e1d61158e581da0dba9914259a3327f6ff1a4800"
            },
            "downloads": -1,
            "filename": "pymongocrypt-1.10.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "c3f52995523d8c7e085cf834a9ba5136",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5451051,
            "upload_time": "2024-07-01T12:32:24",
            "upload_time_iso_8601": "2024-07-01T12:32:24.690611Z",
            "url": "https://files.pythonhosted.org/packages/33/22/ff6cada79fd5e38fa57024ccd7dfab71ec8eae2efe1657f2a30b36a5faf8/pymongocrypt-1.10.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6ae07fba010db2494c8847a5bcffb66f99869e5e12c006792a5060470feb5662",
                "md5": "215675a92a103d39f57975f77b03be37",
                "sha256": "29c9ded711492df0cfc868c5da4e4c2e0faeb33c75470f7533efbe63dc06a026"
            },
            "downloads": -1,
            "filename": "pymongocrypt-1.10.1-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl",
            "has_sig": false,
            "md5_digest": "215675a92a103d39f57975f77b03be37",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5768226,
            "upload_time": "2024-07-01T12:32:27",
            "upload_time_iso_8601": "2024-07-01T12:32:27.480886Z",
            "url": "https://files.pythonhosted.org/packages/6a/e0/7fba010db2494c8847a5bcffb66f99869e5e12c006792a5060470feb5662/pymongocrypt-1.10.1-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2ab6ad97687545266293aac03a2aa050c52289b134a84ea7cba6f705493bb75e",
                "md5": "03ab6f7b8401e53455480a43c9f490bc",
                "sha256": "277d6f7eaf0275d78087ad01e7dcc9bde757d763d7a8428b9039237caa0960fd"
            },
            "downloads": -1,
            "filename": "pymongocrypt-1.10.1-py3-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "03ab6f7b8401e53455480a43c9f490bc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 2706674,
            "upload_time": "2024-07-01T12:32:30",
            "upload_time_iso_8601": "2024-07-01T12:32:30.788009Z",
            "url": "https://files.pythonhosted.org/packages/2a/b6/ad97687545266293aac03a2aa050c52289b134a84ea7cba6f705493bb75e/pymongocrypt-1.10.1-py3-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0b948d03061c0721264f97e3b8f87a56f57aa74a4128038705bb131e0e657993",
                "md5": "9d050cb182e3ec85b70e5288478668a4",
                "sha256": "29fd069bb4e6edbe07f2e0b113022c74d3cb84c04a03de67e912f550df8fd42c"
            },
            "downloads": -1,
            "filename": "pymongocrypt-1.10.1.tar.gz",
            "has_sig": false,
            "md5_digest": "9d050cb182e3ec85b70e5288478668a4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 61897,
            "upload_time": "2024-07-01T12:32:32",
            "upload_time_iso_8601": "2024-07-01T12:32:32.652048Z",
            "url": "https://files.pythonhosted.org/packages/0b/94/8d03061c0721264f97e3b8f87a56f57aa74a4128038705bb131e0e657993/pymongocrypt-1.10.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-01 12:32:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mongodb",
    "github_project": "libmongocrypt",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pymongocrypt"
}
        
Elapsed time: 1.19517s