swagger-py-codegen
swagger-py-codegen copied to clipboard
added --use-async option: generate async handlers (tornado)
The modification could not be compatible with python 2.x, though python 2.x should not be supported anymore. Maybe we can publish a new major version to accept this pr? @Rejown @zrq495 @foodszhang
For python prior to 3.5 (without the async
keyword) it is possible to use @gen.coroutine
decorator on handler methods and use yield
instead of await
to make them asynchronous.
So there could've been two mutually exclusive options like --use-async
and --use-gen-coroutine
.