Skip to main content

libcst transformer and codemod for updating tornado @gen.coroutine syntax to python3.5+ native async/await

Project description

Tornado Async Transformer

A libcst transformer for updating tornado @gen.coroutine syntax to python3.5+ native async/await.

Check out the demo.

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

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

tornado-async-transformer-0.1.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tornado_async_transformer-0.1.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file tornado-async-transformer-0.1.1.tar.gz.

File metadata

  • Download URL: tornado-async-transformer-0.1.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for tornado-async-transformer-0.1.1.tar.gz
Algorithm Hash digest
SHA256 655abcb712b28d2d565a17de07055bb10a2383c9dfcc062cd4a52f6f55f0c5f2
MD5 33db5bb6873a95650782b6d58c4a12b8
BLAKE2b-256 81033337430fd33b4f34078642276fe0b988ec4df387e63f03533e33d0894485

See more details on using hashes here.

File details

Details for the file tornado_async_transformer-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: tornado_async_transformer-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for tornado_async_transformer-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0548810e0f85b5d4c0d6c24b5b26c0230778b4e02c5a4d03f93c3266c1f0be94
MD5 14a32e8ed909e8b67e899b52d6ad5078
BLAKE2b-256 072fa7ee0a25b870f765cdc51543d58528487a80039eadbf6f49e6e0c1614a3d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page