Getting Started on Heroku with Python | Heroku Dev Center (2024)

Introduction

Complete this tutorial to deploy a sample Python Django app to Heroku.

The tutorial assumes that you have:

  • A verified Heroku Account
  • Python version 3.12 installed locally - see the installation guides for OS X, Windows, and Linux.
  • An Eco dynos plan subscription (recommended)

Using dynos and databases to complete this tutorial counts towards your usage. We recommend using our low-cost plans to complete this tutorial. Eligible students can apply for platform credits through our new Heroku for GitHub Students program.

Set Up

The Heroku CLI requires Git, the popular version control system. If you don’t have Git installed, complete the following before proceeding:

Install the Heroku Command Line Interface (CLI). You can use the CLI to manage and scale your applications, provision add-ons, view your logs, and run your application locally.

Download and run the installer for your platform:

Getting Started on Heroku with Python | Heroku Dev Center (1)macOS

$ brew tap heroku/brew && brew install heroku

Getting Started on Heroku with Python | Heroku Dev Center (2)Windows

Download the appropriate installer for your Windows installation:

64-bit installer

32-bit installer

After installation, you can use the heroku command from your command shell.

On Windows, start the Command Prompt (cmd.exe) or Powershell to access the command shell.

To log in to the Heroku CLI, use the heroku login command:

$ heroku loginheroku: Press any key to open up the browser to login or q to exit:Opening browser to https://cli-auth.heroku.com/auth/cli/browser/***Logging in... doneLogged in as me@example.com

This command opens your web browser to the Heroku login page. If your browser is already logged in to Heroku, simply click the Log in button displayed on the page.

This authentication is required for both the heroku and git commands to work correctly.

If you have any problems installing or using the Heroku CLI, see the main Heroku CLI article for advice and troubleshooting steps.

If you’re behind a firewall that uses a proxy to connect with external HTTP/HTTPS services, set the HTTP_PROXY or HTTPS_PROXY environment variables in your local development environment before running the heroku command.

Clone the App

If you’re new to Heroku, it’s recommended that youcomplete this tutorial using the Heroku-provided sample application.

If you have an existing application you want to deploy,follow this article instead.

Clone the sample application so that you have a local version of the code. Execute these commands in your local command shell or terminal:

$ git clone https://github.com/heroku/python-getting-started.git$ cd python-getting-started

You now have a functioning git repository that contains a simple application. It includes a runtime.txt specifying the Python version to use and a requirements.txt, used by Python’s dependency manager, Pip.

Define a Procfile

Use a Procfile, a text file in the root directory of your application, to explicitly declare what command to execute to start your app.

The Procfile in the example app looks like this:

web: gunicorn gettingstarted.wsgi

This Procfile declares a single process type, web, and the command needed to run it. The name web is important here. It declares that this process type is attached to Heroku’s HTTP routing stack and receives web traffic when deployed. The command used here runs Gunicorn, the web server, and passes in a configuration file.

A Procfile can contain additional process types. For example, you can declare a background worker process that processes items off a queue.

Microsoft Windows

The sample app has an additional Procfile for local development on Microsoft Windows, located in the file Procfile.windows. Later tutorial steps use this instead to start a different web server compatible with Windows.

web: python manage.py runserver %PORT%

Create and Deploy the App

Using a dyno and a database to complete this tutorial counts towards your usage. Delete your app, and database as soon as you’re done to control costs.

By default, apps use Eco dynos if you’re subscribed to Eco. Otherwise, it defaults to Basic dynos. The Eco dynos plan is shared across all Eco dynos in your account and is recommended if you plan on deploying many small apps to Heroku. Learn more here. Eligible students can apply for platform credits through our Heroku for GitHub Students program.

To prepare Heroku to receive your source code, create an app:

$ heroku createCreating app... done, ⬢ serene-caverns-82714https://serene-caverns-82714.herokuapp.com/ | https://git.heroku.com/serene-caverns-82714.git

When you create an app, a git remote called heroku is also created and associated with your local git repository. Git remotes are versions of your repository that live on other servers. You deploy your app by pushing its code to that special Heroku-hosted remote associated with your app.

Heroku generates a random name for your app, in this case, serene-caverns-82714. You can specify your own app name.

Deploy your code. This command pushes the main branch of the sample repo to your heroku remote, which then deploys to Heroku:

$ git push heroku mainEnumerating objects: 673, done.Counting objects: 100% (673/673), done.Delta compression using up to 10 threadsCompressing objects: 100% (315/315), done.Writing objects: 100% (673/673), 141.61 KiB | 141.61 MiB/s, done.Total 673 (delta 305), reused 673 (delta 305), pack-reused 0remote: Resolving deltas: 100% (305/305), done.remote: Updated 28 paths from 9c4e1ebremote: Compressing source files... done.remote: Building source:remote:remote: -----> Building on the Heroku-22 stackremote: -----> Determining which buildpack to use for this appremote: -----> Python app detectedremote: -----> Using Python version specified in runtime.txtremote: -----> Installing python-3.12.3remote: -----> Installing pip 24.0, setuptools 69.2.0 and wheel 0.43.0remote: -----> Installing SQLite3remote: -----> Installing requirements with pipremote: Collecting django<5.1,>=5.0 (from -r requirements.txt (line 1))remote: Downloading Django-5.0.4-py3-none-any.whl.metadata (4.1 kB)remote: Collecting gunicorn<23,>=22 (from -r requirements.txt (line 2))remote: Downloading gunicorn-22.0.0-py3-none-any.whl.metadata (4.1 kB)remote: Collecting dj-database-url<3,>=2 (from -r requirements.txt (line 3))remote: Downloading dj_database_url-2.1.0-py3-none-any.whl.metadata (11 kB)remote: Collecting whitenoise<7,>=6 (from whitenoise[brotli]<7,>=6->-r requirements.txt (line 4))remote: Downloading whitenoise-6.6.0-py3-none-any.whl.metadata (3.7 kB)remote: Collecting asgiref<4,>=3.7.0 (from django<5.1,>=5.0->-r requirements.txt (line 1))remote: Downloading asgiref-3.8.1-py3-none-any.whl.metadata (9.3 kB)remote: Collecting sqlparse>=0.3.1 (from django<5.1,>=5.0->-r requirements.txt (line 1))remote: Downloading sqlparse-0.4.4-py3-none-any.whl.metadata (4.0 kB)remote: Collecting packaging (from gunicorn<23,>=22->-r requirements.txt (line 2))remote: Downloading packaging-24.0-py3-none-any.whl.metadata (3.2 kB)remote: Collecting typing-extensions>=3.10.0.0 (from dj-database-url<3,>=2->-r requirements.txt (line 3))remote: Downloading typing_extensions-4.11.0-py3-none-any.whl.metadata (3.0 kB)remote: Collecting Brotli (from whitenoise[brotli]<7,>=6->-r requirements.txt (line 4))remote: Downloading Brotli-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.5 kB)remote: Downloading Django-5.0.4-py3-none-any.whl (8.2 MB)remote: Downloading gunicorn-22.0.0-py3-none-any.whl (80 kB)remote: Downloading dj_database_url-2.1.0-py3-none-any.whl (7.7 kB)remote: Downloading whitenoise-6.6.0-py3-none-any.whl (19 kB)remote: Downloading asgiref-3.8.1-py3-none-any.whl (23 kB)remote: Downloading sqlparse-0.4.4-py3-none-any.whl (41 kB)remote: Downloading typing_extensions-4.11.0-py3-none-any.whl (34 kB)remote: Downloading Brotli-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.9 MB)remote: Downloading packaging-24.0-py3-none-any.whl (53 kB)remote: Installing collected packages: Brotli, whitenoise, typing-extensions, sqlparse, packaging, asgiref, gunicorn, django, dj-database-urlremote: Successfully installed Brotli-1.1.0 asgiref-3.8.1 dj-database-url-2.1.0 django-5.0.4 gunicorn-22.0.0 packaging-24.0 sqlparse-0.4.4 typing-extensions-4.11.0 whitenoise-6.6.0remote: -----> $ python manage.py collectstatic --noinputremote: WARNING:root:No DATABASE_URL environment variable set, and so no databases setupremote: 1 static file copied to '/tmp/build_74ee2e7d/staticfiles', 1 post-processed.remote:remote: -----> Discovering process typesremote: Procfile declares types -> webremote:remote: -----> Compressing...remote: Done: 33Mremote: -----> Launching...remote: Released v3remote: https://serene-caverns-82714.herokuapp.com/ deployed to Herokuremote:remote: Verifying deploy... done.To https://git.heroku.com/serene-caverns-82714.git * [new branch] main -> main

The application is now deployed. Ensure that at least one instance of the app is running:

$ heroku ps:scale web=1

If you see the error Couldn't find that process type (web) when running the ps:scale, it means your app is still deploying. Wait a few minutes and try again.

Visit the app at the URL shown in the deploy output. As a handy shortcut, you can also open the website as follows:

$ heroku open

View Logs

Heroku treats logs as streams of time-ordered events, aggregated from the output streams of all your app and Heroku components. Heroku provides a single stream for all events.

View information about your running app by using one of the logging commands, heroku logs --tail:

$ heroku logs --tail2023-12-07T16:24:23.439479+00:00 heroku[web.1]: Starting process with command `gunicorn gettingstarted.wsgi`2023-12-07T16:24:24.079246+00:00 app[web.1]: [2023-12-07 16:24:24 +0000] [2] [INFO] Starting gunicorn 22.0.02023-12-07T16:24:24.079485+00:00 app[web.1]: [2023-12-07 16:24:24 +0000] [2] [INFO] Listening at: http://0.0.0.0:14495 (2)2023-12-07T16:24:24.079518+00:00 app[web.1]: [2023-12-07 16:24:24 +0000] [2] [INFO] Using worker: sync2023-12-07T16:24:24.081369+00:00 app[web.1]: [2023-12-07 16:24:24 +0000] [7] [INFO] Booting worker with pid: 72023-12-07T16:24:24.090070+00:00 app[web.1]: [2023-12-07 16:24:24 +0000] [8] [INFO] Booting worker with pid: 82023-12-07T16:24:24.191717+00:00 app[web.1]: WARNING:root:No DATABASE_URL environment variable set, and so no databases setup2023-12-07T16:24:24.198722+00:00 app[web.1]: WARNING:root:No DATABASE_URL environment variable set, and so no databases setup2023-12-07T16:24:24.575600+00:00 heroku[web.1]: State changed from starting to up2023-12-07T16:25:39.298227+00:00 heroku[router]: at=info method=GET path="/" host=serene-caverns-82714.herokuapp.com request_id=e6d0c869-28dd-4ba3-820e-6fc137b4a32a fwd="123.45.67.89" dyno=web.1 connect=0ms service=8ms status=200 bytes=7732 protocol=https

To see more log messages generate, visit your application in the browser first.

To stop streaming the logs, press Control+C.

Scale the App

After deploying the sample app, it automatically runs on a single web dyno. Think of a dyno as a lightweight container that runs the command specified in the Procfile.

You can check how many dynos are running using the ps command:

$ heroku psEco dyno hours quota remaining this month: 999h 50m (99%)Eco dyno usage for this app: 0h 0m (0%)For more information on dyno sleeping and how to upgrade, see:https://devcenter.heroku.com/articles/dyno-sleeping=== web (Eco): gunicorn gettingstarted.wsgi (1)web.1: up 2023/12/07 16:24:24 +0000 (~ 3m ago)

Scaling an application on Heroku is equivalent to changing the number of running dynos. Scale the number of web dynos to zero:

$ heroku ps:scale web=0Scaling dynos... done, now running web at 0:Eco

Access the app again by hitting refresh on the web tab, or heroku open to open it in a web tab. You get an error message because you no longer have any web dynos available to serve requests.

Scale it up again:

$ heroku ps:scale web=1Scaling dynos... done, now running web at 1:Eco

By default, apps use Eco dynos if you’re subscribed to Eco. Otherwise, it defaults to Basic dynos. The Eco dynos plan is shared across all Eco dynos in your account and is recommended if you plan on deploying many small apps to Heroku. Eco dynos sleep if they don’t receive any traffic for half an hour. This sleep behavior causes a few seconds delay for the first request upon waking. Eco dynos consume from a monthly, account-level quota of eco dyno hours. As long as you haven’t exhausted the quota, your apps can continue to run.

To avoid dyno sleeping, upgrade to a Basic or higher dyno type as described in the Dyno Types article. Upgrading to at least Standard dynos allows you to scale up to multiple dynos per process type.

Install App Dependencies Locally

Heroku recognizes an app as a Python app by looking for key files. Including a requirements.txt in the root directory is one way we recognize your Python app.

The demo app you deployed already has a requirements.txt, and it looks something like this:

django>=5.0,<5.1gunicorn>=22,<23dj-database-url>=2,<3whitenoise[brotli]>=6,<7

The requirements.txt file lists the app’s dependencies. When Heroku deploys an app, the platform reads this file and installs the appropriate Python dependencies using the pip install -r command.

To install the dependencies locally, create a virtual environment, also known as a venv. This environment lets you install the packages without affecting your system Python installation. Create a virtual environment inside the example app directory with this command:

$ python3 -m venv --upgrade-deps .venv

Next, activate the virtual environment:

If you’re on a Microsoft Windows system, activate with:

.\.venv\Scripts\activate

Or if you’re on a macOS/Linux system, activate with:

source .venv/bin/activate

For help with setting up a virtual environment, see the Python documentation.

Finally, install the dependencies into the newly created environment:

$ pip install -r requirements.txt

Installing the dependencies also installs their dependencies. You can see them by using pip’s feature list:

$ pip listPackage Version----------------- -------asgiref 3.8.1Brotli 1.1.0dj-database-url 2.1.0Django 5.0.4gunicorn 22.0.0packaging 24.0pip 24.0sqlparse 0.4.4typing_extensions 4.11.0whitenoise 6.6.0

After installing dependencies, you can run your app locally.

Run the App Locally

Before continuing, ensure that you have installed the app’s dependencies locally.

Start your application locally using heroku local, which is a part of the Heroku CLI.

If you’re on a Microsoft Windows system, run this:

$ heroku local --port 5001 -f Procfile.windows

Or if you’re on a macOS/Linux system, use the default Procfile by running:

$ heroku local --port 5001

Running the command starts up the local web server:

[OKAY] Loaded ENV .env File as KEY=VALUE Format16:30:48 web.1 | [2023-12-07 16:30:48 +0000] [47691] [INFO] Starting gunicorn 22.0.016:30:48 web.1 | [2023-12-07 16:30:48 +0000] [47691] [INFO] Listening at: http://0.0.0.0:5001 (47691)16:30:48 web.1 | [2023-12-07 16:30:48 +0000] [47691] [INFO] Using worker: sync16:30:48 web.1 | [2023-12-07 16:30:48 +0000] [47692] [INFO] Booting worker with pid: 47692

Just like Heroku, heroku local uses the Procfile to know what command to execute.

To see your app running locally, open http://localhost:5001 with your web browser.

To stop the app from running locally, in the CLI, press Control + C to exit.

Push Local Changes

In this step, you propagate a local change to the application to Heroku.

Add the requests package to your requirements.txt file:

django>=5.0,<5.1gunicorn>=22,<23dj-database-url>=2,<3whitenoise[brotli]>=6,<7requests

Use pip to install the requests package via the updated requirements.txt file:

$ pip install -r requirements.txt

Modify hello/views.py to import the requests module and the Django HttpResponse class at the top of the file:

import requestsfrom django.http import HttpResponse

Now modify the index method to use the module. Try replacing the current index method with the following code:

def index(request): r = requests.get('https://httpbin.org/status/418') print(r.text) return HttpResponse('<pre>' + r.text + '</pre>')

Now test again locally.

If you’re on a Microsoft Windows system, run this:

$ heroku local --port 5001 -f Procfile.windows

Or if you’re on a macOS/Linux system, use the default Procfile by running:

$ heroku local --port 5001

Visit your application at http://localhost:5001 to see the output of fetching https://httpbin.org/status/418:

 -=[ teapot ]=- _...._ .' _ _ `. | ."` ^ `". _, \_;`"---"`|// | ;/ \_ _/ `"""`

If you see the error Internal Server Error in your browser, and the error ModuleNotFoundError: No module named 'requests' in the terminal log output, check that the requests package installed successfully.

Now deploy. Almost every deploy to Heroku follows this same pattern. First, add the modified files to the local git repository:

$ git add .

Now commit the changes to the repository:

$ git commit -m "Demo"

Now deploy as before:

$ git push heroku main

Finally, check that everything is working:

$ heroku open

Provision a Logging Add-on

Add-ons are third-party cloud services that provide out-of-the-box additional services for your application, from persistence through logging to monitoring and more.

By default, Heroku stores 1500 lines of logs from your application, but the full log stream is available as a service. Several add-on providers have logging services that provide things such as log persistence, search, and email and SMS alerts.

In this step, you provision one of these logging add-ons, Papertrail.

Provision the Papertrail logging add-on:

$ heroku addons:create papertrailCreating papertrail on ⬢ serene-caverns-82714... freeWelcome to Papertrail. Questions and ideas are welcome (technicalsupport@solarwinds.com). Happy logging!Created papertrail-convex-88929 as PAPERTRAIL_API_TOKENUse heroku addons:docs papertrail to view documentation

The add-on is now deployed and configured for your application. You can list add-ons for your app with this command:

$ heroku addons

To see this particular add-on in action, visit your application’s Heroku URL a few times. Each visit generates more log messages, which get routed to the Papertrail add-on. Visit the Papertrail console to see the log messages:

$ heroku addons:open papertrail

Your browser opens up a Papertrail web console that shows the latest log events. The interface lets you search and set up alerts.

Getting Started on Heroku with Python | Heroku Dev Center (3)

Start a Console

You can run a command, typically scripts and applications that are part of your app, in a one-off dyno using the heroku run command. You can also launch a REPL process attached to your local terminal for experimenting in your app’s environment:

$ heroku run python manage.py shellRunning python manage.py shell on ⬢ serene-caverns-82714... up, run.9594 (Eco)Type "help", "copyright", "credits" or "license" for more information.(InteractiveConsole)>>>

If you receive an error, Error connecting to process, configure your firewall.

The Python shell runs in the context of your app and all its dependencies. From here, you can import some of your application files. For example, you can run:

>>> import requests>>> print(requests.get('https://httpbin.org/status/418').text) -=[ teapot ]=- _...._ .' _ _ `. | ."` ^ `". _, \_;`"---"`|// | ;/ \_ _/ `"""`

To exit the Python shell, run the command exit().

Let’s try another example. Create another one-off dyno and run the bash command to open up a shell on that dyno. You can then execute commands there. Each dyno has its own ephemeral filespace, populated with your app and its dependencies. After the command completes, in this case, bash, the dyno terminates:

$ heroku run bashRunning bash on ⬢ serene-caverns-82714... up, run.3789 (Eco)~ $ lsapp.json gettingstarted hello manage.py Procfile Procfile.windows README.md requirements.txt runtime.txt staticfiles~ $ exitexit

Don’t forget to type exit to exit the shell and terminate the dyno.

Define Config Vars

Heroku lets you externalize configuration by storing data such as encryption keys or external resource addresses in config vars.

At runtime, config vars are exposed as environment variables to the application.

Edit hello/views.py. At the beginning of the file, add a line to import the os module:

import osfrom django.http import HttpResponse

Now modify the index method so that it repeats an action depending on the value of the TIMES environment variable:

def index(request): times = int(os.environ.get('TIMES', 3)) return HttpResponse('Hello! ' * times)

heroku local automatically sets up the environment based on the contents of the .env file in your local directory. In the top-level directory of your sample project, there’s already a .env file that contains:

TIMES=2

Run the app with heroku local --port 5001 and visit http://localhost:5001 to see “Hello!” twice.

To set the config var on Heroku, execute this command:

$ heroku config:set TIMES=2

View the app’s config vars using heroku config:

$ heroku config=== serene-caverns-82714 Config VarsPAPERTRAIL_API_TOKEN: <SECRET_TOKEN>TIMES: 2

To see this change in action, deploy your changed application to Heroku.

Provision and Use a Database

The add-on marketplace has a large number of data stores, from Redis and MongoDB providers, to Postgres and MySQL.

An essential-0 Postgres size costs $5 a month, prorated to the minute. At the end of this tutorial, we prompt you to delete your database to minimize costs.

To provision an essential-0 Heroku Postgres add-on, use the addons:create command:

$ heroku addons:create heroku-postgresql:essential-0Creating heroku-postgresql:essential-0 on ⬢ serene-caverns-82714... ~$0.007/hour (max $5/month)Database should be available soonpostgresql-aerodynamic-21282 is being created in the background. The app will restart when complete...Use heroku addons:info postgresql-aerodynamic-21282 to check creation progressUse heroku addons:docs heroku-postgresql to view documentation

You can find out a more about the database provisioned for your app using the addons command in the CLI:

$ heroku addonsAdd-on Plan Price State──────────────────────────────────────────────── ─────────── ──────── ───────heroku-postgresql (postgresql-aerodynamic-21282) essential-0 $5/month created └─ as DATABASE...

Listing the config vars for your app displays the URL that your app uses to connect to the database, DATABASE_URL:

$ heroku config=== serene-caverns-82714 Config VarsDATABASE_URL: postgres://emhmpvrhtwgqhx:<PASSWORD>@ec2-52-205-45-222.compute-1.amazonaws.com:5432/daacqaueosis8n...

Heroku also provides a pg command that shows a lot more:

$ heroku pg=== DATABASE_URLPlan: Essential 0Status: AvailableConnections: 0/20PG Version: 15.5Created: 2024-05-01 13:22 UTCData Size: 7.5 MB/1.00 GB (0.73%) (In compliance)Tables: 0Fork/Follow: UnsupportedRollback: UnsupportedContinuous Protection: OffAdd-on: postgresql-aerodynamic-21282

This info shows an essential-0 database running Postgres v15.5 with no tables.

The example app you deployed already has database functionality, however, you must make two small changes to enable it.

First, uncomment the two psycopg lines at the end of the requirements.txt file:

psycopg[c]; sys_platform == "linux"psycopg[binary]; sys_platform != "linux"

These lines ensure that the Postgres database adapter package installs during the build.

Next, uncomment the release process line at the end of the Procfile file:

release: ./manage.py migrate --no-input

This release process entry enables the Heroku Release Phase feature, and uses it to run any Django database migrations whenever the app deploys.

Deploy your changed application to Heroku using the same deployment process as before. You can see Django’s database migrations run after the build:

remote: Running release command...remote:remote: Operations to perform:remote: Apply all migrations: auth, contenttypes, hello, sessionsremote: Running migrations:remote: Applying contenttypes.0001_initial... OKremote: Applying contenttypes.0002_remove_content_type_name... OKremote: Applying auth.0001_initial... OKremote: Applying auth.0002_alter_permission_name_max_length... OKremote: Applying auth.0003_alter_user_email_max_length... OKremote: Applying auth.0004_alter_user_username_opts... OKremote: Applying auth.0005_alter_user_last_login_null... OKremote: Applying auth.0006_require_contenttypes_0002... OKremote: Applying auth.0007_alter_validators_add_error_messages... OKremote: Applying auth.0008_alter_user_username_max_length... OKremote: Applying auth.0009_alter_user_last_name_max_length... OKremote: Applying auth.0010_alter_group_name_max_length... OKremote: Applying auth.0011_update_proxy_permissions... OKremote: Applying auth.0012_alter_user_first_name_max_length... OKremote: Applying hello.0001_initial... OKremote: Applying sessions.0001_initial... OKremote: Waiting for release.... done.

If the build fails with a settings.DATABASES is improperly configured error, check that you provisioned the database add-on before deploying.

Visit the database demonstration page by visiting your app’s URL and appending /db. For example, if your app was deployed to https://serene-caverns-82714.herokuapp.com/ then visit https://serene-caverns-82714.herokuapp.com/db.

Access the /db route again to see a simple page update every time you access it:

Page View ReportDec 7, 2023, 4:57 p.m.Dec 7, 2023, 4:58 p.m.

The code to access the database is straightforward. It uses a simple Django model called Greetings that you can find in hello/models.py.

Whenever you visit the /db route of your app, the following method in the hello/views.py file invokes and creates a greeting. It then renders all the existing greetings:

def db(request): greeting = Greeting() greeting.save() greetings = Greeting.objects.all() return render(request, 'db.html', {'greetings': greetings})

If you have Postgres installed locally, use the heroku pg:psql command to connect to the remote database and see all the rows:

$ heroku pg:psql--> Connecting to postgresql-cubed-97628...Type "help" for help.serene-caverns-82714::DATABASE=>

Read more about Heroku PostgreSQL.

You can use a similar technique to install MongoDB or Redis add-ons.

Next Steps

You now know how to deploy an app, change its configuration, view logs, scale, and attach add-ons.

Here’s some recommended reading:

  • Read How Heroku Works for a technical overview of the concepts you encounter while writing, configuring, deploying, and running applications.
  • To deploy an existing Python or Django app on Heroku, read Deploying Python and Django Apps on Heroku.
  • To learn more about developing and deploying Python applications, visit the Python category.

Remember to delete your example app, and database as soon as you’re done with the tutorial, to control costs.

Delete Your App and Add-ons

Remove the app and database from your account. You’re only charged for the resources you used.

This action removes your add-on and any data saved in the database.

$ heroku addons:destroy heroku-postgresql ▸ WARNING: Destructive Action ▸ This command will affect the app serene-caverns-82714 ▸ To proceed, type serene-caverns-82714 or re-run this command with ▸ --confirm serene-caverns-82714>

This action permanently deletes your application

$ heroku apps:destroy ▸ WARNING: This will delete ⬢ serene-caverns-82714 including all add-ons. ▸ To proceed, type serene-caverns-82714 or re-run this command with ▸ --confirm serene-caverns-82714>

You can confirm that your add-on and app are gone with these commands:

$ heroku addons --all$ heroku apps --all
Getting Started on Heroku with Python | Heroku Dev Center (2024)
Top Articles
14 Health Benefits Of Elderberry, Uses, Dosage, And Recipes
25 Healthy Soup Recipes
Spasa Parish
Rentals for rent in Maastricht
159R Bus Schedule Pdf
Sallisaw Bin Store
Black Adam Showtimes Near Maya Cinemas Delano
Espn Transfer Portal Basketball
Pollen Levels Richmond
11 Best Sites Like The Chive For Funny Pictures and Memes
Things to do in Wichita Falls on weekends 12-15 September
Craigslist Pets Huntsville Alabama
Paulette Goddard | American Actress, Modern Times, Charlie Chaplin
Red Dead Redemption 2 Legendary Fish Locations Guide (“A Fisher of Fish”)
‘An affront to the memories of British sailors’: the lies that sank Hollywood’s sub thriller U-571
Tyreek Hill admits some regrets but calls for officer who restrained him to be fired | CNN
Haverhill, MA Obituaries | Driscoll Funeral Home and Cremation Service
Rogers Breece Obituaries
Ems Isd Skyward Family Access
Elektrische Arbeit W (Kilowattstunden kWh Strompreis Berechnen Berechnung)
Omni Id Portal Waconia
Kellifans.com
Banned in NYC: Airbnb One Year Later
Four-Legged Friday: Meet Tuscaloosa's Adoptable All-Stars Cub & Pickle
Model Center Jasmin
Ice Dodo Unblocked 76
Is Slatt Offensive
Labcorp Locations Near Me
Storm Prediction Center Convective Outlook
Experience the Convenience of Po Box 790010 St Louis Mo
Fungal Symbiote Terraria
modelo julia - PLAYBOARD
Poker News Views Gossip
Abby's Caribbean Cafe
Joanna Gaines Reveals Who Bought the 'Fixer Upper' Lake House and Her Favorite Features of the Milestone Project
Tri-State Dog Racing Results
Navy Qrs Supervisor Answers
Trade Chart Dave Richard
Lincoln Financial Field Section 110
Free Stuff Craigslist Roanoke Va
Wi Dept Of Regulation & Licensing
Pick N Pull Near Me [Locator Map + Guide + FAQ]
Crystal Westbrooks Nipple
Ice Hockey Dboard
Über 60 Prozent Rabatt auf E-Bikes: Aldi reduziert sämtliche Pedelecs stark im Preis - nur noch für kurze Zeit
Wie blocke ich einen Bot aus Boardman/USA - sellerforum.de
Infinity Pool Showtimes Near Maya Cinemas Bakersfield
Dermpathdiagnostics Com Pay Invoice
How To Use Price Chopper Points At Quiktrip
Maria Butina Bikini
Busted Newspaper Zapata Tx
Latest Posts
Article information

Author: Kimberely Baumbach CPA

Last Updated:

Views: 6309

Rating: 4 / 5 (61 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Kimberely Baumbach CPA

Birthday: 1996-01-14

Address: 8381 Boyce Course, Imeldachester, ND 74681

Phone: +3571286597580

Job: Product Banking Analyst

Hobby: Cosplaying, Inline skating, Amateur radio, Baton twirling, Mountaineering, Flying, Archery

Introduction: My name is Kimberely Baumbach CPA, I am a gorgeous, bright, charming, encouraging, zealous, lively, good person who loves writing and wants to share my knowledge and understanding with you.