Skip to main content

RESTful Client for tornado

Project description

https://travis-ci.org/mosquito/rest-client.svg Latest Version https://img.shields.io/pypi/wheel/rest-client.svg https://img.shields.io/pypi/pyversions/rest-client.svg https://img.shields.io/pypi/l/rest-client.svg

RESTful Client for tornado with support cookies.

Example:

# encoding: utf-8
from tornado.ioloop import IOLoop
from tornado.gen import coroutine, Return
from rest_client.async import RESTClient

io_loop = IOLoop.current()

@coroutine
def repo_list():
    client = RESTClient(headers={'User-Agent': 'curl/7.43.0'})
    # check api
    yield client.get('https://api.github.com/users/octocat/orgs')

    response = yield client.get('https://api.github.com/repos/vmg/redcarpet/issues?state=closed')
    data = sum(map(lambda x: x.comments, response.body))
    print('Total comments: {0}'.format(data))

exit(io_loop.run_sync(repo_list))

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

rest-client-0.3.6.tar.gz (4.4 kB view details)

Uploaded Source

File details

Details for the file rest-client-0.3.6.tar.gz.

File metadata

  • Download URL: rest-client-0.3.6.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rest-client-0.3.6.tar.gz
Algorithm Hash digest
SHA256 b56ea11bb6b3aeb086b4e0d2257ac8c22e7ff0764874874a07f58ac9849482a0
MD5 abe7c549037b92fb4aedabeba1064951
BLAKE2b-256 7e05b3f0307d929fd56a6018b800b9f2134b45fdb1e9a99d230ed6b2b4ba0210

See more details on using hashes here.

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