Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
130 views
in Technique[技术] by (71.8m points)

android - How to deploy local python flask REST server for flutter app backend

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...