restapi的包装器
syndicate的Python项目详细描述
辛迪加
==
restapi的包装器*![成熟度](https://img.shields.io/pypi/status/syndicate.svg)(https://pypi.python.org/pypi/syndicate)
[![许可证](https://img.shields.io/pypi/l/syndicate.svg)(https://pypi.python.org/pypi/syndicate)
[![更改日志](https://img.shields.io/badge/Change Log blue.svg)(https://github.com/mayfield/syndicate/blob/master/CHANGELOG.md)
[![构建状态](https://semaphoreci.com/api/v1/projects/50fbd264-8014-4fbd-9295-c99c65c8b05a/533670/shields_badge.svg)(https://semaphoreci.com/mayfield/syndicate)
[![版本](https://img.shields.io/pypi/v/syndicate.svg)(https://pypi.python.org/pypi/syndicate)
about
--
syndicate是一个使用基于http的restapi的库。这提供了
一般处理序列化(JSON、XML)和URI映射的方法,这在最近发布的许多restapi中都可以看到目前,Tastype API是主要的
目标,但是如果其他API的工作方式大致相同,那么系统应该能够与其他API一起工作。
Requirements
--
*requests(sync mode)
*aiohttp(async mode)
installation
--
python./setup.py install
--
--
*http适配器之间的统一身份验证。
*文档
同步和异步。
同步模式使用“请求”库作为http适配器,异步模式使用“aiohttp”。如果用户有自己的后端,则可以提供适配器。
会话管理(通过适配器)和序列化。
Synchronous Examples
--
**创建连接**
>使用远程API的一些基本描述实例化服务类以获得持久连接。
``python
import syndicate
bakery=syndicate.service(uri='https://a.bakery.fake',urn='/api/v1/',
auth=('mrpresident','1000xlight-points'))
`````
**简单获取**
>获取所有资源,网址为https://a.bakery.fake/api/v1/cake/
``python
,用于烘焙店中的x。获取('cake'):
打印(“cake就是食物:”,< < < < > > >“添加一个新的资源”,“>”,“.”,“.”,“.”,“.”;“.”;“.”;“.”“圆”;“.”;“16000000001”;“对不起”直接的事情。让我们“bake/api/v1/cake/100”在内容
正文中给出一些说明。
``python
bakery.do('bake',cake',100,temp=420,time=3600)
````
==
restapi的包装器*![成熟度](https://img.shields.io/pypi/status/syndicate.svg)(https://pypi.python.org/pypi/syndicate)
[![许可证](https://img.shields.io/pypi/l/syndicate.svg)(https://pypi.python.org/pypi/syndicate)
[![更改日志](https://img.shields.io/badge/Change Log blue.svg)(https://github.com/mayfield/syndicate/blob/master/CHANGELOG.md)
[![构建状态](https://semaphoreci.com/api/v1/projects/50fbd264-8014-4fbd-9295-c99c65c8b05a/533670/shields_badge.svg)(https://semaphoreci.com/mayfield/syndicate)
[![版本](https://img.shields.io/pypi/v/syndicate.svg)(https://pypi.python.org/pypi/syndicate)
about
--
syndicate是一个使用基于http的restapi的库。这提供了
一般处理序列化(JSON、XML)和URI映射的方法,这在最近发布的许多restapi中都可以看到目前,Tastype API是主要的
目标,但是如果其他API的工作方式大致相同,那么系统应该能够与其他API一起工作。
Requirements
--
*requests(sync mode)
*aiohttp(async mode)
installation
--
--
*http适配器之间的统一身份验证。
*文档
同步和异步。
同步模式使用“请求”库作为http适配器,异步模式使用“aiohttp”。如果用户有自己的后端,则可以提供适配器。
会话管理(通过适配器)和序列化。
Synchronous Examples
--
**创建连接**
>使用远程API的一些基本描述实例化服务类以获得持久连接。
``python
import syndicate
bakery=syndicate.service(uri='https://a.bakery.fake',urn='/api/v1/',
auth=('mrpresident','1000xlight-points'))
`````
**简单获取**
>获取所有资源,网址为https://a.bakery.fake/api/v1/cake/
``python
,用于烘焙店中的x。获取('cake'):
打印(“cake就是食物:”,< < < < > > >“添加一个新的资源”,“>”,“.”,“.”,“.”,“.”;“.”;“.”;“.”“圆”;“.”;“16000000001”;“对不起”直接的事情。让我们“bake/api/v1/cake/100”在内容
正文中给出一些说明。
``python
bakery.do('bake',cake',100,temp=420,time=3600)
````