mautrix.client — mautrix-python 0.21.0 documentation (original) (raw)
class mautrix.client.Client
Bases: EncryptingAPI, Syncer
Client is a high-level wrapper around the client API.
__init__(*args, sync_store=None, state_store=None, **kwargs)
Initialize a ClientAPI. You must either provide the api parameter with an existingmautrix.api.HTTPAPI instance, or provide the base_url and other arguments for creating it as kwargs.
Parameters:
- mxid – The Matrix ID of the user. This is used for things like setting profile metadata. Additionally, the homeserver domain is extracted from this string and used for setting aliases and such. This can be changed later using set_mxid.
- device_id – The device ID corresponding to the access token used.
- api – The mautrix.api.HTTPAPI instance to use. You can also pass the
kwargsto create a HTTPAPI instance rather than creating the instance yourself. - kwargs – If
apiis not specified, then the arguments to pass when creating a HTTPAPI. - sync_store (SyncStore | None)
- state_store (StateStore | None)
Return type:
None
property crypto_: crypt.OlmMachine | None_
The crypto.OlmMachine to use for e2ee stuff.