跳转到主要内容

Tornado的低级别Amazon Web Services API客户端

项目描述

Tornado的低级别Amazon Web Services API客户端

Version Status Coverage License

安装

tornado-aws可以通过您选择的工具通过Python包索引安装。我更喜欢pip

pip install tornado-aws

示例

import json
import pprint

import tornado_aws
from tornado import gen, ioloop

HEADERS = {'Content-Type': 'application/x-amz-json-1.0',
           'x-amz-target': 'DynamoDB_20120810.DescribeTable'}
PAYLOAD = {'TableName': 'my-dynamodb-table'}

_ioloop = ioloop.IOLoop.instance()

@gen.coroutine
def async_request():
    client = tornado_aws.AsyncAWSClient('dynamodb')
    response = yield client.fetch('POST', '/', headers=HEADERS,
                                  body=json.dumps(PAYLOAD))
    x = json.loads(response.body.decode('utf-8'))
    pprint.pprint(x)
    _ioloop.stop()

_ioloop.add_callback(async_request)
_ioloop.start()

文档

文档可在ReadTheDocs上找到。

需求

版本历史

可在https://tornado-aws.readthedocs.org/en/latest/history.html找到

项目详情


下载文件

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

源分发

tornado-aws-2.0.0.tar.gz (14.2 kB 查看哈希值)

上传时间

构建分发版

tornado_aws-2.0.0-py2.py3-none-any.whl (14.8 kB 查看哈希值)

上传时间 Python 2 Python 3

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面