Skip to main content

Backend implementation of the namespace `urn:xmpp:omemo:2` for python-omemo.

Project description

PyPI PyPI - Python Version Build Status Documentation Status

python-twomemo

Backend implementation for python-omemo, equipping python-omemo with support for OMEMO under the namespace urn:xmpp:omemo:2 (casually/jokingly referred to as "twomemo").

Installation

python-twomemo depends on two system libraries, libxeddsa>=2,<3 and libsodium.

Install the latest release using pip (pip install twomemo) or manually from source by running pip install . (recommended) or python setup.py install in the cloned repository. The installation requires libsodium and the Python development headers to be installed. If a locally installed version of libxeddsa is available, python-xeddsa (a dependency of python-x3dh) tries to use that. Otherwise it uses prebuilt binaries of the library, which are available for Linux, MacOS and Windows for the amd64 architecture, and potentially for MacOS arm64 too. Set the LIBXEDDSA_FORCE_LOCAL environment variable to forbid the usage of prebuilt binaries.

Protobuf

Install protoc. Then, in the root directory of this repository, run:

$ pip install protobuf mypy mypy-protobuf types-protobuf
$ protoc --python_out=twomemo/ --mypy_out=twomemo/ twomemo.proto

This will generate twomemo/twomemo_pb2.py and twomemo/twomemo_pb2.pyi.

Type Checks and Linting

python-twomemo uses mypy for static type checks and both pylint and Flake8 for linting. All checks can be run locally with the following commands:

$ pip install --upgrade mypy pylint flake8 mypy-protobuf types-protobuf
$ mypy --strict twomemo/ setup.py
$ pylint twomemo/ setup.py
$ flake8 twomemo/ setup.py

Getting Started

Refer to the documentation on readthedocs.io, or build/view it locally in the docs/ directory. To build the docs locally, install the requirements listed in docs/requirements.txt, e.g. using pip install -r docs/requirements.txt, and then run make html from within the docs/ directory. The documentation can then be found in docs/_build/html/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Twomemo-1.0.1.tar.gz (16.3 kB view details)

Uploaded Source

File details

Details for the file Twomemo-1.0.1.tar.gz.

File metadata

  • Download URL: Twomemo-1.0.1.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.2

File hashes

Hashes for Twomemo-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d492ba4b69f867ffa18173c1dd1b497b24cae085b20c0572baa26b59918f4d94
MD5 6a1de9548e9bfa0e13ea5a8c95c9938e
BLAKE2b-256 353009cef99728c9705d89d00926326b86b08da04b51a1e0ad92be445155eab7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page