Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

A low-level Amazon Web Services API client for Tornado

Project description

A low-level Amazon Web Services API client for Tornado

Version 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for tornado-aws, version 2.0.0
Filename, size File type Python version Upload date Hashes
Filename, size tornado_aws-2.0.0-py2.py3-none-any.whl (14.8 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size tornado-aws-2.0.0.tar.gz (14.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page