Skip to main content

Use tornado AsyncHTTPClient inside botocore.

Project description

This module allows to use botocore with tornado AsyncHTTPClient, so we can write asynchronous code in tornado for interacting with amazon web services.

Example

A Simple EC2 Example from botocore docs:

import botocore.session


if __name__ == '__main__':
    session = botocore.session.get_session()
    ec2 = session.get_service('ec2')
    operation = ec2.get_operation('DescribeInstances')
    endpoint = ec2.get_endpoint('us-east-1')
    http_response, response_data = operation.call(endpoint)
    print response_data

Using tornado-botocore:

from tornado.ioloop import IOLoop
from tornado_botocore import Botocore


def on_response(response):
    http_response, response_data = response
    print response_data


if __name__ == '__main__':
    ec2 = Botocore(
        service='ec2', operation='DescribeInstances',
        region_name='us-east-1')
    ec2.call(callback=on_response)
    IOLoop.instance().start()

Contribute

If you want to contribute to this project, please perform the following steps

# Fork this repository
# Clone your fork
$ virtualenv .env --no-site-packages
$ source .env/bin/activate
$ pip install -r requirements.txt

$ git co -b feature_branch master
# Implement your feature
$ git add . && git commit
$ git push -u origin feature_branch
# Send us a pull request for your feature branch

Project details


Download files

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

Source Distribution

tornado-botocore-0.0.1.tar.gz (4.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page