Allow typer to execute async commands by wrapping them in asyncio.run() - #444
Allow typer to execute async commands by wrapping them in asyncio.run()#444paulo-raca wants to merge 2 commits into
Conversation
|
📝 Docs preview for commit e4c48c3 at: https://639cea27a7c2ed08a58a9c0a--typertiangolo.netlify.app |
|
📝 Docs preview for commit 07b2214 at: https://64aeb33c3927d700a0c055be--typertiangolo.netlify.app |
|
📝 Docs preview for commit 9d1f105 at: https://64af4344ad652212d4e70cd6--typertiangolo.netlify.app |
|
📝 Docs preview for commit f63ae5d at: https://64af4e620519fc0091307924--typertiangolo.netlify.app |
f63ae5d to
f133c19
Compare
|
📝 Docs preview for commit 7d2e6a7 at: https://64af500590cb4b00b49a91fa--typertiangolo.netlify.app |
1e7c2eb to
9f5c32e
Compare
|
📝 Docs preview for commit 4308aec at: https://64af512a55f978008660e38f--typertiangolo.netlify.app |
4308aec to
4bfc499
Compare
|
📝 Docs preview for commit 4bfc499 at: https://64af552eb5272602e83a5ab4--typertiangolo.netlify.app |
2fcdee1 to
d0d713b
Compare
|
📝 Docs preview for commit 22dc4de at: https://64af5e876b7aa4068618a49f--typertiangolo.netlify.app |
22dc4de to
b65aea7
Compare
|
📝 Docs preview for commit b65aea7 at: https://64af60c10641ae07645c748f--typertiangolo.netlify.app |
b65aea7 to
d744687
Compare
|
📝 Docs preview for commit d744687 at: https://64af65dd71b6b40a43d75136--typertiangolo.netlify.app |
d744687 to
3eb6020
Compare
|
📝 Docs preview for commit 3eb6020 at: https://64af667dd2cdb809b318ae44--typertiangolo.netlify.app |
3eb6020 to
1f3d7d1
Compare
|
📝 Docs preview for commit 1f3d7d1 at: https://64af671671b6b40a97d74efb--typertiangolo.netlify.app |
|
@tiangolo, sorry to keep it open for so long without completing. I've now added documentation and fixed mypy errors, I believe it is good to go 😃 Thanks! |
|
@paulo-raca if you have not discovered it yet a good alternative with async io support is |
|
This pull request has a merge conflict that needs to be resolved. |
I've been using asyncio on a lot of my python tools, and wrapping things in
asyncio.run()becomes clumsy quickly 😅This change Automatically wraps typer commands in
asyncio.run()if they are asyncio coroutines.