Skip to main content

Client-Server SDK for Matrix

Project description

This is a Matrix client-server SDK for Python 2.x.

Usage
=====
The SDK provides 2 layers of interaction. The low-level layer just wraps the
raw HTTP API calls. The high-level layer wraps the low-level layer and provides
an object model to perform actions on.

Client:

.. code:: python

from matrix_client.client import MatrixClient

client = MatrixClient("http://localhost:8008")
token = client.register_with_password(username="foobar", password="monkey")
room = client.create_room("my_room_alias")
room.send_text("Hello!")


API:

.. code:: python

from matrix_client.api import MatrixHttpApi

matrix = MatrixHttpApi("https://matrix.org", token="some_token")
response = matrix.initial_sync()
response = matrix.send_message("!roomid:matrix.org", "Hello!")


Structure
=========
The SDK is split into two modules: ``api`` and ``client``.

API
---
This contains the raw HTTP API calls and has minimal business logic. You can
set the access token (``token``) to use for requests as well as set a custom
transaction ID (``txn_id``) which will be incremented for each request.

Client
------
This encapsulates the API module and provides object models such as ``Room``.

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

matrix_client-0.0.1.tar.gz (8.0 kB view details)

Uploaded Source

File details

Details for the file matrix_client-0.0.1.tar.gz.

File metadata

File hashes

Hashes for matrix_client-0.0.1.tar.gz
Algorithm Hash digest
SHA256 91e99bd62b4688d7f30201f40c1b5803dc867285dffc69d751cba3b16094e806
MD5 a80f19752fada7cebc064b898cd09791
BLAKE2b-256 8ad43c6d2e8cf894126f623b23e5cdebfe530980e80e65212a362b560c71e417

See more details on using hashes here.

Supported by

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