1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
[](https://pypi.org/project/OMEMO/)
[](https://pypi.org/project/OMEMO/)
[](https://github.com/Syndace/python-omemo/actions/workflows/test-and-publish.yml)
[](https://py-omemo.readthedocs.io/)
# python-omemo #
A Python implementation of the [OMEMO Multi-End Message and Object Encryption protocol](https://xmpp.org/extensions/xep-0384.html).
A complete implementation of [XEP-0384](https://xmpp.org/extensions/xep-0384.html) on protocol-level, i.e. more than just the cryptography. python-omemo supports different versions of the specification through so-called backends. A backend for OMEMO in the `urn:xmpp:omemo:2` namespace (the most recent version of the specification) is available in the [python-twomemo](https://github.com/Syndace/python-twomemo) Python package. A backend for (legacy) OMEMO in the `eu.siacs.conversations.axolotl` namespace is available in the [python-oldmemo](https://github.com/Syndace/python-oldmemo) package. Multiple backends can be loaded and used at the same time, the library manages their coexistence transparently.
## Installation ##
Install the latest release using pip (`pip install OMEMO`) or manually from source by running `pip install .` in the cloned repository.
## Testing, Type Checks and Linting ##
python-omemo uses [pytest](https://docs.pytest.org/en/latest/) as its testing framework, [mypy](http://mypy-lang.org/) for static type checks and both [pylint](https://pylint.pycqa.org/en/latest/) and [Flake8](https://flake8.pycqa.org/en/latest/) for linting. All tests/checks can be run locally with the following commands:
```sh
$ pip install --upgrade pytest pytest-asyncio pytest-cov mypy pylint flake8
$ pip install --upgrade twisted twomemo[xml] oldmemo[xml]
$ mypy --strict --disable-error-code str-bytes-safe omemo/ setup.py examples/ tests/
$ pylint omemo/ setup.py examples/ tests/
$ flake8 omemo/ setup.py examples/ tests/
$ pytest --cov=omemo --cov-report term-missing:skip-covered
```
## Getting Started ##
Refer to the documentation on [readthedocs.io](https://py-omemo.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/`.
The `functionality.md` file contains an overview of supported functionality/use cases, mostly targeted at developers.
|