I want to release an Android app with a Flutter frontend and a Python backend which fetch its data from a local postgresql database. The two parts communicate via a Flask REST-Api. I now search for a way to deploy it on android. The fact, that the Flask needs to run on the local device, makes it a difficult task. My research came to no meaningful conclusion.
For now, I have the flask server running on my computer. The frontend can accesses it in the Android Virtual Device, so backend and frontend are separated. While researching, I thought about using Docker, but i have no idea how to do it and if it is the right choice.
[Edit] I should have given more Information. I want the frontend to access the data offline. Before that, the data will be encrypted and decrypted it through Python. Thats the point of the Flask api, there is no other way to connect python with flutter. So for offline access i need a way to deploy python and the db on the local device. It is not the best approach, but the encryption is important for the app, and it really need to be python. Thanks for the comments until now...
question from:
https://stackoverflow.com/questions/65935404/how-to-deploy-local-python-flask-rest-server-for-flutter-app-backend 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…