HTTP Client Mixin for Tornado RequestHandlers
Project description
HTTP Client Mixin for Tornado RequestHandlers.
Installation
sprockets.mixins.http is available on the Python Package Index and can be installed via pip or easy_install:
pip install sprockets.mixins.http
Documentation
Requirements
pycurl
tornado>=4.2.0,<5
Example
This examples demonstrates the most basic usage of sprockets.mixins.http
python my-example-app.py
from tornado import gen, web
from sprockets.mixins import amqp
def make_app(**settings):
return web.Application(
[
web.url(r'/', RequestHandler),
], **settings)
class RequestHandler(http.HTTPClientMixin,
correlation.HandlerMixin,
web.RequestHandler):
@gen.coroutine
def get(self, *args, **kwargs):
response = yield self.http_fetch('https://www.google.com')
License
sprockets.mixins.http is released under the 3-Clause BSD license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for sprockets.mixins.http-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2b6983b9b5d77d006d7487c30ee385e9b8d6049df5175fb332677e2afd4024b |
|
MD5 | 895e80f6a5e5e854231b5a00585639a0 |
|
BLAKE2b-256 | aedcb426101c9f2e45b104ce0977f1f00326b6a55a31373d5601bc90ba8d4c42 |