RESTful Client for tornado
Project description
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
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
rest-client-0.3.3.tar.gz
(4.4 kB
view details)
File details
Details for the file rest-client-0.3.3.tar.gz
.
File metadata
- Download URL: rest-client-0.3.3.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d424d288e48b74a3112cb22b2b61b32affb2fd0a50e5703457929552e52cdcc |
|
MD5 | d7a2b430e7521c80944ac228ac34c36f |
|
BLAKE2b-256 | 3d42c50346a4d5ea831dd1d94832d7d7b007a99256675e126a2d968c6a2e0dc8 |