Module: types

class omemo.types.AsyncFramework(value)[source]

Bases: Enum

Frameworks for asynchronous code supported by python-omemo.

ASYNCIO: str = 'ASYNCIO'
TWISTED: str = 'TWISTED'
class omemo.types.DeviceInformation(namespaces, active, bare_jid, device_id, identity_key, trust_level_name, label)[source]

Bases: tuple

Structure containing information about a single OMEMO device.

Parameters
  • namespaces (FrozenSet[str]) –

  • active (FrozenSet[Tuple[str, bool]]) –

  • bare_jid (str) –

  • device_id (int) –

  • identity_key (bytes) –

  • trust_level_name (str) –

  • label (Optional[str]) –

property namespaces

Alias for field number 0

property active

Alias for field number 1

property bare_jid

Alias for field number 2

property device_id

Alias for field number 3

property identity_key

Alias for field number 4

property trust_level_name

Alias for field number 5

property label

Alias for field number 6

exception omemo.types.OMEMOException[source]

Bases: Exception

Parent type for all custom exceptions in this library.

class omemo.types.TrustLevel(value)[source]

Bases: Enum

The three core trust levels.

TRUSTED: str = 'TRUSTED'
DISTRUSTED: str = 'DISTRUSTED'
UNDECIDED: str = 'UNDECIDED'