How to connect to flask server from flutter app after build? - python

I have my flask app which would serve my flutter app using HTTP requests. Everything is okay when the mobile phone is connected to the PC. But once after we deploy the app to the mobile phone and detach it from the PC, how would the flask app serve the flutter app?
Is there any way which would start the python script when the flutter app is launched in the mobile phone?

for testing purpose you can use ngrok to deploy your flask server, for more info ngrok

Your phone when connected to the PC is accessing a Flask app via 'localhost'. You have two options to make it work (i.e. access Flask based REST APIs from the mobile when not connected to the PC).
Expose Flask app to the network. And make sure both PC and the mobile phone are on the same wifi. This link might help for that.
Deploy the Flask based APIs somewhere. There are few free web servers available out there (e.g. MS Azure). This or this link might help.

Related

Use Android Push Notifications in Local Area Network

So, we are building a solution which is containerised using docker-compose and we have a flutter app with it. We plan to use it both on the web as well as on a local server away from the internet. Are there any ways to set up notifications to the application without having to rely on an outside service ? Ie , a notification service that can be dockerized and run without an internet. The mobile app can shift between the main server and local server , so what way can we achieve this?

How we can deploy a Flask + React Application to Azure?

I want to create a machine learning app with Flask as backend and keep React JS as the front-end. Though I found couple of tutorials how to do that but there are very few in terms of deployment. I want to deploy and host a Flask+ReactJS app to Azure cloud. Is there any good tutorial or link which I can follow. I have been struggling for days now.
Thanks
To achieve the above requirement you can find the below mentioned sample resource to create and host flask and react app in AZURE.
To do that we will need to setup the flask app as backend and then React app.
Please refer this BLOG for complete setup to build.
For more information you can refer the below links:-
SO THREAD: How to deploy a Flask+React application to Azure Web Service
BLOG:- Deploy your Flask app on Azure & How to automate Python/Flask deployment to Azure App Service

Login to flask web server via android buildozer app

I have a python flask web server and a python buildozer app with kivy running on android.
Now i want to login to my web server via app and upload files (e.g. pictures, texts).
I'm new to this and would like to know how it is possible?
Thanks for helping.
just use something like ehm i dont know the name ah sockets

Python + Node.js on GAE

I have a Django application deployed on Google App Engine standard environment. I am interested in server side rendering of my JS frontend. Can I use node.js alongside Django on the same GAE? Maybe as microservice?
What you can do is to deploy each of your app as a separate service in App Engine and they will work independently as a microservice. To do so, make sure to set a service name for each of the app.yaml file of your apps:
service: service-name
Afterwards, you can communicate between your services through an HTTP invocation, such as a user request or a RESTful API call. Code in one service can't directly call code in another service.
Refer to this link for additional information about communicating between your services.
I have come across articles that talk about integrating python and Node but I personally haven't done it or seen it done on GAE.
If I were to take a stab, I think you would be looking at something like
Have the python app as a service (say it's available on python_service.myapp.appspot.com
Have your Node.js as your default service available on myapp.appspot.com
Your Nodejs will have a route and when this route is invoked, you make an http request to the python service, wait for a response and then your Nodejs app returns that response.
Our App, https://nocommandline.com is an Electron App (combo of Node.js & Vue.js) If you purchase a license and try to validate it, we make a call server side and our server side is Python based. It's not exactly the same thing you're looking at (since our App is not web-based) but this gives you an idea of what I was trying to describe.

how to publish the flutter app with python file

Hello
I have successfully connected the python file/script with flutter app by http request. Now I need to make my app live on google play store, where should I keep my python file so it will be connected with flutter app and works for all users. Please help.
Thanks

Categories

Resources