skip to navigation
skip to content

aiobearychat 0.2.0

BearyChat 异步 Python SDK

BearyChat 异步 Python SDK

Features

  • 封装所有的 OpenAPI
  • 封装所有的 RTM HTTP API
  • 支持不同的异步 HTTP 请求模块(aiohttp, tornado, …)

Installation

At the command line:

$ pip install aiobearychat[aiohttp]

Usage

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())

Credits

This package was created with Cookiecutter and the mozillazg/cookiecutter-pypackage project template.

 
File Type Py Version Uploaded on Size
aiobearychat-0.2.0-py2.py3-none-any.whl (md5) Python Wheel 3.6 2017-08-27 25KB
aiobearychat-0.2.0.tar.gz (md5) Source 2017-08-27 14KB