4 ms·
Thanks for your work on this. If I am willing to hack a bit, is it possible? What is the main obstacle? Is it all middleware?
by petters 7y ago
Thanks for your work on this.
If I am willing to hack a bit, is it possible?
What is the main obstacle? Is it all middleware?
- m_ke 7y agoAndrew gave a recent talk about it here https://www.youtube.com/watch?v=d9BAUBEyFgM https://www.youtube.com/watch?v=d9BAUBEyFgM middleware is a part of it, then there's the ORM, caching and anything else that does IO.
- mattrp 7y agoIf you’re in the hacking mode - what do you think of taking the Django orm and grafting it onto fast api - sort of like a stand-alone sqlalchemy but with all the ease and power or django’s querysets...
- m_ke 7y agoDjango ORM is not async so using it with FastAPI would block the event loop. I guess you could wrap the calls in sync_to_async from asgiref but it wouldn't be pretty. Another option is using something like Tom Christie's orm project (https://github.com/encode/orm https://github.com/encode/orm), which is a wrapper on top of sqlachemy with a django like interface.