an old fork of the python sdk, i think this is used in feedbot.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ryan Rix 186e76cf57 Implement m.image type in Client 8 years ago
matrix_client Implement m.image type in Client 8 years ago
.gitignore Initial commit 9 years ago
LICENSE Initial commit 9 years ago Add a 9 years ago
README.rst Add pypi badge to README.rst 9 years ago Bump to 0.0.2 8 years ago


Matrix Client SDK for Python

.. image::
  :alt: Latest Version

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

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.


.. 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")


.. code:: python

    from matrix_client.api import MatrixHttpApi

    matrix = MatrixHttpApi("", token="some_token")
    response = matrix.initial_sync()
    response = matrix.send_message("!", "Hello!")

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

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.

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