I have a flask application running on Heroku which reads and writes a Heroku PostgreSQL Database. I then want to have a local python application running on a client's computer which only reads from this database. The idea is to be able to configure the program that's running locally from anywhere in the world with the web application running on Heroku.
The flask application is already up and running and modifies the database correctly. Now I have to connect to this database from a computer with a python application running locally.
To connect to a Heroku Postgres DB externally, Heroku provides the following [solution] (https://devcenter.heroku.com/articles/connecting-to-heroku-postgres-databases-from-outside-of-heroku#credentials/)
I want to access this cloud database with a local application running on the clients computer. However, to get the DATABASE_URL, at some point I have to login to Heroku with my account email and password which give access to everything. I was hoping there could be a way of accessing this external Database with a user with restricted permission to it. In my case, I want to access it with a user who can only read the data and leave my Heroku account out of this.
Using PostgreSQL was my first approach but I stumbled upon this issue. Am I right in that it IS an issue?
My second approach is to use google drive API to link my web application to my local application. The web application will modify a file and the local application will read from it with a user with READ-ONLY permission. In this way, if the local application gets reversed engineered or hacked in some way, no critical information is revealed. I think I can do this with google drive API.
Is there a better approach? I'm using free tools and the data handled by the database or google-drive API is lightweight for now. I feel that if I would want to scale the application, google drive API wouldn't be the best solution.