{"id":20218116,"url":"https://github.com/matrix-org/matrix-python-sdk","last_synced_at":"2025-10-24T09:35:55.109Z","repository":{"id":25426366,"uuid":"28855778","full_name":"matrix-org/matrix-python-sdk","owner":"matrix-org","description":"Matrix Client-Server SDK for Python 2 and 3","archived":false,"fork":false,"pushed_at":"2022-10-16T09:13:19.000Z","size":2849,"stargazers_count":256,"open_issues_count":59,"forks_count":119,"subscribers_count":53,"default_branch":"master","last_synced_at":"2025-05-10T16:48:40.646Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matrix-org.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-06T09:17:45.000Z","updated_at":"2025-04-24T15:45:15.000Z","dependencies_parsed_at":"2022-08-19T17:00:52.086Z","dependency_job_id":null,"html_url":"https://github.com/matrix-org/matrix-python-sdk","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrix-org%2Fmatrix-python-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrix-org%2Fmatrix-python-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrix-org%2Fmatrix-python-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matrix-org%2Fmatrix-python-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matrix-org","download_url":"https://codeload.github.com/matrix-org/matrix-python-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254270641,"owners_count":22042858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T06:37:16.009Z","updated_at":"2025-10-24T09:35:55.024Z","avatar_url":"https://github.com/matrix-org.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Matrix Client SDK for Python\n============================\n\n.. image:: https://img.shields.io/pypi/v/matrix-client.svg?maxAge=600\n  :target: https://pypi.python.org/pypi/matrix-client\n  :alt: Latest Version\n.. image:: https://travis-ci.org/matrix-org/matrix-python-sdk.svg?branch=master\n  :target: https://travis-ci.org/matrix-org/matrix-python-sdk\n  :alt: Travis-CI Results\n.. image:: https://coveralls.io/repos/github/matrix-org/matrix-python-sdk/badge.svg?branch=master\n  :target: https://coveralls.io/github/matrix-org/matrix-python-sdk?branch=master\n  :alt: coveralls.io Results\n.. image:: https://img.shields.io/matrix/matrix-python-sdk:matrix.org\n   :target: https://matrix.to/#/%23matrix-python-sdk:matrix.org\n   :alt: Matrix chatroom\n.. image:: https://img.shields.io/badge/docs-stable-blue\n   :target: https://matrix-org.github.io/matrix-python-sdk/\n   :alt: Documentation\n\n\nMatrix client-server SDK for Python 2.7 and 3.4+\n\nProject Status\n--------------\n\nWe strongly recommend using the `matrix-nio`_ library rather than this\nsdk. It is both more featureful and more actively maintained.\n\nThis sdk is currently lightly maintained without any person ultimately\nresponsible for the project. Pull-requests **may** be reviewed, but no\nnew-features or bug-fixes are being actively developed. For more info\nor to volunteer to help, please see\nhttps://github.com/matrix-org/matrix-python-sdk/issues/279 or come\nchat in `#matrix-python-sdk:matrix.org`_.\n\n.. _`matrix-nio`: https://github.com/poljar/matrix-nio\n.. _`#matrix-python-sdk:matrix.org`: https://matrix.to/#/%23matrix-python-sdk:matrix.org\n\nInstallation\n============\nStable release\n--------------\nInstall with pip from pypi. This will install all necessary dependencies as well.\n\n.. code:: shell\n\n   pip install matrix_client\n\nDevelopment version\n-------------------\nInstall using ``setup.py`` in root project directory. This will also install all\nneeded dependencies.\n\n.. code:: shell\n\n   git clone https://github.com/matrix-org/matrix-python-sdk.git\n   cd matrix-python-sdk\n   python setup.py install\n\nUsage\n=====\nThe SDK provides 2 layers of interaction. The low-level layer just wraps the\nraw HTTP API calls. The high-level layer wraps the low-level layer and provides\nan object model to perform actions on.\n\nClient:\n\n.. code:: python\n\n    from matrix_client.client import MatrixClient\n\n    client = MatrixClient(\"http://localhost:8008\")\n\n    # New user\n    token = client.register_with_password(username=\"foobar\", password=\"monkey\")\n\n    # Existing user\n    token = client.login(username=\"foobar\", password=\"monkey\")\n\n    room = client.create_room(\"my_room_alias\")\n    room.send_text(\"Hello!\")\n\n\nAPI:\n\n.. code:: python\n\n    from matrix_client.api import MatrixHttpApi\n\n    matrix = MatrixHttpApi(\"https://matrix.org\", token=\"some_token\")\n    response = matrix.send_message(\"!roomid:matrix.org\", \"Hello!\")\n\n\nStructure\n=========\nThe SDK is split into two modules: ``api`` and ``client``.\n\nAPI\n---\nThis contains the raw HTTP API calls and has minimal business logic. You can\nset the access token (``token``) to use for requests as well as set a custom\ntransaction ID (``txn_id``) which will be incremented for each request.\n\nClient\n------\nThis encapsulates the API module and provides object models such as ``Room``.\n\nSamples\n=======\nA collection of samples are included, written in Python 3.\n\nYou can either install the SDK, or run the sample like this:\n\n.. code:: shell\n\n    PYTHONPATH=. python samples/samplename.py\n\nBuilding the Documentation\n==========================\n\nThe documentation can be built by installing ``sphinx`` and ``sphinx_rtd_theme``.\n\nSimple run ``make`` inside ``docs`` which will list the avaliable output formats.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrix-org%2Fmatrix-python-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatrix-org%2Fmatrix-python-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrix-org%2Fmatrix-python-sdk/lists"}