First, itβs not very difficult to use Django ORM outside of manage.py
, WSGI, and other HTTP-related handlers. You can use any python script, but it needs some initialization ( example ).
Secondly, SQLA is a very powerful tool, and it can do things that are very difficult to achieve in Django ORM (for example, genuine polymorphism and polymorphic queries). If I had to choose, I would personally decide to use Django ORM as a platform for creating models, and then manually map them to SQLA, since it is much more flexible and, I hope, able to accept. What may not work in the opposite case.
Finally, since you can use Django ORM on both sides, and you just have to use Django ORM because of the plugins, I suggest abandoning SQLA. This is a powerful tool, but also quite complex. Having two different ORMs running in the same database can lead to unforeseen problems in the future and increase the complexity of your application, making it more difficult to maintain.
source share