Skip to content

A low-level Amazon Web Services API client for Tornado

License

Notifications You must be signed in to change notification settings

aleh-rudzko/tornado-aws

 
 

Repository files navigation

tornado-aws

A low-level Amazon Web Services API client for Tornado

Version Downloads Status Coverage License

Installation

tornado-aws may be installed via the Python package index with the tool of your choice. I prefer pip:

pip install tornado-aws

Example

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

Documentation

Documentation is available on ReadTheDocs.

Requirements

Version History

Available at https://tornado-aws.readthedocs.org/en/latest/history.html

About

A low-level Amazon Web Services API client for Tornado

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%