Metadata-Version: 2.4
Name: Twomemo
Version: 2.1.0
Summary: Backend implementation of the namespace `urn:xmpp:omemo:2` for python-omemo.
Author-email: "Tim Henkes (Syndace)" <me@syndace.dev>
Maintainer-email: "Tim Henkes (Syndace)" <me@syndace.dev>
License-Expression: MIT
Project-URL: Documentation, https://python-twomemo.readthedocs.io/
Project-URL: Repository, https://github.com/Syndace/python-twomemo
Project-URL: Issues, https://github.com/Syndace/python-twomemo/issues
Project-URL: Changelog, https://github.com/Syndace/python-twomemo/blob/main/CHANGELOG.md
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Intended Audience :: Developers
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Security :: Cryptography
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: OMEMO<3,>=2.0.0
Requires-Dist: DoubleRatchet<2,>=1.2.0
Requires-Dist: X3DH<2,>=1.2.0
Requires-Dist: XEdDSA<2,>=1.0.0
Requires-Dist: protobuf>=3.20.3
Requires-Dist: typing-extensions>=4.3.0
Provides-Extra: xml
Requires-Dist: xmlschema>=2.0.2; extra == "xml"
Provides-Extra: docs
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
Requires-Dist: sphinx-rtd-theme; extra == "docs"
Requires-Dist: twomemo[xml]; extra == "docs"
Provides-Extra: lint
Requires-Dist: flake8; extra == "lint"
Requires-Dist: flake8-pyproject; extra == "lint"
Requires-Dist: mypy; extra == "lint"
Requires-Dist: pylint; extra == "lint"
Requires-Dist: twomemo[xml]; extra == "lint"
Requires-Dist: types-protobuf; extra == "lint"
Provides-Extra: dev
Requires-Dist: mypy-protobuf; extra == "dev"
Requires-Dist: twomemo[docs,lint,xml]; extra == "dev"
Dynamic: license-file

[![PyPI](https://img.shields.io/pypi/v/Twomemo.svg)](https://pypi.org/project/Twomemo/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/Twomemo.svg)](https://pypi.org/project/Twomemo/)
[![Build Status](https://github.com/Syndace/python-twomemo/actions/workflows/test-and-publish.yml/badge.svg)](https://github.com/Syndace/python-twomemo/actions/workflows/test-and-publish.yml)
[![Documentation Status](https://readthedocs.org/projects/python-twomemo/badge/?version=latest)](https://python-twomemo.readthedocs.io/)

# python-twomemo #

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

## Installation ##

Install the latest release using pip (`pip install twomemo`) or manually from source by running `pip install .` in the cloned repository.

## Protobuf ##

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

```sh
$ pip install --upgrade .[dev]
$ 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](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 checks can be run locally with the following commands:

```sh
$ pip install --upgrade .[lint]
$ mypy twomemo/
$ pylint twomemo/
$ flake8 twomemo/
```

## Getting Started ##

Refer to the documentation on [readthedocs.io](https://python-twomemo.readthedocs.io/), or build it locally. Additional requirements to build the docs can be installed using `pip install .[docs]`. With all dependencies installed, run `make html` in the `docs/` directory. The documentation can then be found in `docs/_build/html/`.
