Tornado Async Transformer
A libcst transformer for updating tornado @gen.coroutine syntax to python3.5+ native async/await.
Usage
You can either:
- Add
tornado_async_transformer.TornadoAsyncTransformerto your existing libcst codemod. - Or run
python -m tornado_async_transformer.tool my_project/from the commandline.
Example
"""
A simple coroutine.
"""
from tornado import gen
-@gen.coroutine
-def call_api():
- response = yield fetch()
+async def call_api():
+ response = await fetch()
if response.status != 200:
raise BadStatusError()
- raise gen.Return(response.data)
+ return response.data
Metadata
Release files for tornado-async-transformer 0.2.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 | Provenance | Actions |
|---|---|---|---|---|
| tornado-async-transformer-0.2.0.tar.gz | 5.0 kB | Without provenance | Details for tornado-async-transformer-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tornado_async_transformer-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for tornado_async_transformer-0.2.0-py3-none-any.whl |
Total release size: 11.4 kB
Release files / tornado-async-transformer-0.2.0.tar.gz
| Download URL | tornado-async-transformer-0.2.0.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9916199c61d46f08e9cce20b24921492b20e136fa3af72db5adc68d54975db0a
|
|
BLAKE2b-256 checksum How to use checksums |
d8b2d3112af1139924e9ddb27ca2dd006967976b84b17c7f98f983b288f29f2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.5
|
Release files / tornado_async_transformer-0.2.0-py3-none-any.whl
| Download URL | tornado_async_transformer-0.2.0-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
595bde245be4f2ea05f5a0f82dffab7395e99fbf0343c542c8bc8844fba70009
|
|
BLAKE2b-256 checksum How to use checksums |
69fc5383cd9690219b4ddf84631359dad863dbef1be07a358f9b4e0ffb02d903
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.5
|
Security for tornado-async-transformer 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.