Deta – Free Heroku alternative, Step by Step Guide to Deploy a Python app

The cloud platform, is a free alternative to Heroku. This article is a step-by-step guide to deploying a Flask Python app for free.

Heroku is a good cloud platform to deploy and scale apps, but Heroku is no longer free. We can use cloud to freely deploy a Python app.

Create a free Deta account

Fire go to and create an account using your email ID (Credit card not required )

deta welcome screen

Next, we need to select a region or auto.

Select region for deta

Install deta CLI

Next, we need to install deta CLI, using this CLI we can deploy our Python web app. Run the following command to install it.

For Windows users run the below command in PowerShell.

iwr -useb | iex

For Linux/Mac users run the below command.

curl -fsSL | sh

After the installation, open the terminal and type deta command and ensure that the command is working. You will get similar output as below.

Deta command output

Create a Python web app

Let’s create a Python web app.

Type the following command in the terminal here cool_app is the name of our web app.

deta new --python cool_app
Create python app using deta

From the output, we can see the endpoint URL (This is our web app’s URL).

Open the app URL in the browser. Tada !!! our app is running. To see the code of our app navigate to cool_app folder. We can see file.

Deta app folder

Update app as a Flask app and deploy changes

Enter the directory cool_app and then create a file, requirements.txt, which tells Python dependencies to install.


Next, open the in your favorite code editor and remove its content and paste the below code.

from flask import Flask

app = Flask(__name__)

@app.route('/', methods=["GET"])
def greet():
    return "Hello from NoloWiz"

Code is simple it will greet the user with a message. Let’s deploy it.

To deploy these changes, simply run the command.

deta deploy

After the deployment let’s open our app URL in the browser.

Hello from Python app deta

It works!!!


There you have it, a simple free way to deploy and experiment with your Python web apps. Happy coding.