[Django]-Access django database on postgresql from independent python script


I think the best way is to build an API layer to exchange data between your Django and your externals. Django rest framework provides a really simply solution to add a REST layer to your app that is also reusable with any other external.

With this approach you centralize and abstract the direct database manipulation in Django, avoiding any external operation that may break it’s consistency (for example with an alter table).

Leave a comment