Asyncio wrapper of matrix
matrix-api-async的Python项目详细描述
matrix\u client.api的异步包装器。
这是基于https://github.com/matrix-org/matrix-python-sdk/pull/168
用法
import aiohttp from matrix_api_async import AsyncHTTPAPI async def main(): async with aiohttp.ClientSession() as session: mapi = AsyncHTTPAPI("http://matrix.org", session) resp = await mapi.get_room_id("#matrix:matrix.org") print(resp) loop = asyncio.get_event_loop() loop.run_until_complete(main())
安装
PIP安装矩阵API异步
要求
- 矩阵客户
- aiohttp(可能与其他库一起使用)
兼容性
Python3.5+
许可证
麻省理工学院