Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

would this work with django?


asyncpg was designed for asyncio (and async/await). So it can be used in any asyncio, Tornado (and soon Twisted) program.

Django doesn't support asyncio, it's built for blocking IO model. So, unfortunately, it's not possible to use asyncpg with it.


But could be if the code is made to lock? ie, as if the async part not matter?


Theoretically yes, but it would require is to seriously re-architecture the protocol implementation to support several IO modes.


I know its not related to the Asyncio - for Django; you should follow this - http://channels.readthedocs.io/en/latest/index.html


I wouldn't mind knowing this as well!




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

Search: