How to deploy python FLASK API? - python

I have created a api using flask in python. I am done with development. Now I want to deploy it. Can anyone help me that where can i deploy my api and how?

There are many services(PaaS) that you can use to deploy your app. I personally use heroku.
You can use AWS also from the free tier account. If you just google you will find many options( OpenShift, CapRover, Digital Ocean,etc)

You can try the deployment of flask api with Ubuntu .

Related

Test applications for Google Cloud and Azure locally

Is there any way to test applications for Google Cloud or Azure locally in a computer, similar to the Localstack Docker image for AWS?
Thank you!
To test you application locally you can use Google App Engine Local Devolopment server to simulate your app running on app engine externally.
Demo python application via app engine
As you mentioned docker you may want to test your images locally you can also do this by following these instructions.
You can see this post. Here are some useful links, you will find
https://www.testcontainers.org/modules/gcloud/

Deploying Dash app in Azure, remains Loading

I`m trying to deploy a simple Dash App in Azure, and I followed the tutorial below:
https://www.phillipsj.net/posts/deploying-dash-to-azure-without-using-docker/
It works perfectly in my localhost, but when I try to deploy it in Azure the site shows only the message: Loading...
If I try to deploy a Flask App in Azure (https://medium.com/#nikovrdoljak/deploy-your-flask-app-on-azure-in-3-easy-steps-b2fe388a589e) it works perfectly fine.
Could you please give me any indication why this migh happen? Is there any difference between deploying Flask and Dash in Azure?
Thank you in advance
First of all, I recommend you test all the applications locally before you publish it to the Azure Web App. If it does not work fine locally, fix it until it succeeds. For the link you provided in the question, I test it on my side and it does not work fine. With checking, it loses the package dash-renderer. So you can install it and freeze it into the requirements and test it locally. Or directly append it into the requirements.txt:
dash-renderer==0.13.0
Then publish it to the Azure Web App and it will work fine like this:
If you have any more questions, please let me know.

how to upload/install python application in web server

I have a facial recognition model created using python and wish to upload it to my cloud web server, for use within my existing website.
However, I have no idea to go about it. Is the Flask the way to go?
My server is Apache with PHP.
Thank you.
GoDaddy has some documentation about this
Python on server

Deploy django application on Microsoft Azure or Amazon Elastic Besanstalk

I'm deploying a django (python) application. I wondered what is the best way to deploy it. With microsoft azure or Amazon Elastic Beanstalk ?
The application just needs to view data from a database. What are (dis)advantages of azure or elastic beanstalk?
I'm using OSX 10.9.5 and Python 3.4.3
As Gaurav Mantri said, you need to provide more details - atleast the OS you are using. Some more surfing could lead you here :
What's the recommended way to deploy a Django app on IIS?
For web apps, Azure has Azure App Service. Deployment can be done through a variety of ways, including FTP, git, or from Visual Studio. Since you're using Mac, I would recommend deploying via git.
To do so, first create a web app in the Azure portal, and then follow the steps here:
https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/
The advantages of Azure App Service, is that you can easily scale your app to many machines, and everything is taken care for you. Note that depending on how you've configured your database, you would have to deploy that separately.
Also, if you want to test Azure App Service, you can easily create a small sample Django application, using the Azure gallery. See the screen shot below.
Azure Web Apps provide a volume of ways for deployment your web applications. We can leverage tools/IDEs including FTP tools , Visual Studio and WebMatrix on Windows for remoting and modifying your web site code, and leverage repository for continuous deployment including local GIT, GITHUB, Visual Studio Online, Dropbox, Bitbucket.
It depends which way you prefer to.
As # theadriangreen mentioned, Azure Web Apps provide Django template for a quick start, you can simply create a Django application and pull the code to local leveraging the methods above.
Beside Continuous deployment using GIT in Azure App Service, you also can refer to Creating web apps with Django in Azure for more information.

Can one source code be deployed to Openshift, Heroku and Google App Engine at once?

As subject, is is possible with just one source code, we can deploy our code to Openshift or Google App Engine? Heroku is not necessarily in my case.
My application is using Python Flask + PostgreSQL 9.1. I love the easiness in Openshift when I configure my technology stack, but is the case will be same with GAE?
Thanks!
I work on Openshift and at this time I'm not aware of anything that will deploy your code to GAE and Openshift at the same time.
You might be able to write your own script for it.
PostgreSQL is not available on GAE, so this code will definitely not run there.

Categories

Resources