跳转到主要内容

BearyChat 异步 Python SDK

项目描述

https://img.shields.io/pypi/v/aiobearychat.svg https://img.shields.io/travis/mozillazg/aiobearychat.svg https://img.shields.io/coveralls/mozillazg/aiobearychat/master.svg Documentation Status Join the chat at https://gitter.im/mozillazg/aiobearychat

BearyChat 异步 Python SDK

功能

  • 封装所有OpenAPI

  • 封装所有RTM HTTP API

  • 支持不同的异步HTTP请求模块(aiohttp, tornado, ...)

安装

在命令行中

$ pip install aiobearychat[aiohttp]

用法

OpenAPI

import aiohttp

from aiobearychat.openapi.aiohttp import OpenAPI


async def main(token):
    async with aiohttp.ClientSession() as session:
        api = OpenAPI(session, token=token)
        response = await api.user.list()
        print(response.json())

RTM HTTP API

import aiohttp

from aiobearychat.rtm.aiohttp import RtmAPI


async def main(token):
    async with aiohttp.ClientSession() as session:
        api = RtmAPI(session, token=token)
        response = await api.start()
        pprint(response.json())

致谢

此包是用 Cookiecuttermozillazg/cookiecutter-pypackage 项目模板创建的。

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。

源代码分布

aiobearychat-0.2.0.tar.gz (14.3 kB 查看哈希值)

上传时间 源代码

构建版本

aiobearychat-0.2.0-py2.py3-none-any.whl (25.9 kB 查看哈希值)

上传时间 Python 2 Python 3

支持者