This work-in-progress book serves as an introduction to creating a client using the Matrix Client-Server API that enables decentralized communication through the Matrix protocol. It covers making HTTP calls to a Matrix homeserver and addressing issues such as reliability and security for those developing Matrix libraries or clients. The book utilizes a literate programming style, in Python using aiohttp, to create a library named matrixlib for Matrix clients. It explores topics such as end-to-end encryption, media repo, user management, and security issues. The source code and examples are available on GitLab. Some tradeoffs for the library are discussed, serving as a guide rather than a fully-featured library.
https://uhoreg.gitlab.io/matrix-tutorial/index.html