tor-async-util is a set of utilities that are useful when implementing RESTful APIs using Tornado’s Asynchronous and non-Blocking I/O.
Features
when async curl httpclient is used, it’s useful to know if libcurl was compiled with an async dns resolver - see is_libcurl_compiled_with_async_dns_resolver()
instead of CTRL+C generating an unfriendly stack trace install a signal handler - see install_sigint_handler()
a default request handler which generates a RESTful API friendly not found response - see DefaultRequestHandler()
an abstract base class from which all request handler classes can be derived to provide
read and write json requests and responses optionally verifying each against a jsonschema - see RequestHandler.get_json_request_body() and RequestHandler.write_and_verify()
accessing decoded BASIC auth credentials - see RequestHandler.get_basic_auth_creds()
augment Tornado’s default set_status() with support for additional status codes - see RequestHandler.set_status()
override Tornado’s default write_error() so a json response body is generated rather than the default HTML response body - see RequestHandler.write_error()
thin wrapper around ConfigParser.ConfigParser to parse ini files for things settings such as logging levels, keyczar crypters and keyczar signers - see Config
core implementations of /_version, /_noop and /_health endpoints include async health checkers - see generate_version_response(), generate_noop_response(), generate_health_check_response() and AsyncHealthCheck
this explains that the time_info attribute of a tornado response object contains timing details of the phases of a request which is available when using the cURL http client. a description of these timing details can be found at here. these timings are very, very helpful in understanding latencies from interactions between microservices - see write_http_client_response_to_log(). an example of what the logs look like is below
2016-01-23T03:45:53.362+00:00 INFO async_docker_remote_api 'Remote Docker API' took 3.42 ms to respond with 200 to 'GET' against >>>http://127.0.0.1:4243/containers/cid/logs?stdout=1<<< - timing detail: q=0.13 ms n=0.03 ms c=0.04 ms p=1.65 ms s=1.66 ms t=1.83 ms r=0.00 ms
Release files for tor_async_util 1.15.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tor_async_util-1.15.0.tar.gz | 12.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tor_async_util-1.15.0-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 26.8 kB
Release files / tor_async_util-1.15.0.tar.gz
| Download URL | tor_async_util-1.15.0.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8ad6cffc81cf1eb343c6c6c2d3887234e66a53f349565b594d3425684fb09fec
|
|
BLAKE2b-256 checksum How to use checksums |
22f21fdcfb39c5a377b589e395267d698dcdb09a17ad2eb97618bd8ed2dc0d2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.12
|
Release files / tor_async_util-1.15.0-py2-none-any.whl
| Download URL | tor_async_util-1.15.0-py2-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
0ab16dda01611393e05775b5de89853960d79d5c19eeea7bf92b900c7ea687db
|
|
BLAKE2b-256 checksum How to use checksums |
212a0f9da9ce4a7879906e67c8e9656ed351344ce19794dcf596964cc38bbce3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.12
|