Hacker News new | past | comments | ask | show | jobs | submit login

There is no _switch_! You can use easily _mix_ sync and async code without any consequences.

Django provides `sync_to_async` and `async_to_sync`, but it's trivial to do this yourself without Django:

https://docs.djangoproject.com/en/3.0/topics/async/#async-ad...

You can write sync code and use async calls only when needed.

Also, async python is awesome. Things were messy 2-3 years ago, but everything is so much better now.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: