-
-
Notifications
You must be signed in to change notification settings - Fork 833
Allow typer to execute async commands by wrapping them in asyncio.run() #444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
svlandeg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't reviewed this in detail yet, but if we ever do want to progress with this PR, we'll want to update the tutorial examples to use Typer() directly as in #1418
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.