❮ Back to FAQ

Python Setup

What Python versions and frameworks does Scout support?

Scout supports Python 3.8+ with the following frameworks: - Django 3.2+ - Flask 0.10+ - FastAPI (via Starlette) - Celery 3.1+

Additional supported libraries include Bottle, Dash, Dramatiq, Falcon, Huey, Hug, RQ, and Starlette.

How do I install Scout for Django?

  1. Install the package:
pip install scout-apm
  1. Configure in settings.py:
INSTALLED_APPS = [
    "scout_apm.django",  # should be listed first
    # ... other apps ...
]

SCOUT_MONITOR = True
SCOUT_KEY = "[YOUR KEY FROM SCOUT UI]"
SCOUT_NAME = "My Django App"
  1. Deploy. Data appears within approximately five minutes.

How do I install Scout for Flask?

  1. Install the package:
pip install scout-apm
  1. Configure in your Flask app:
from scout_apm.flask import ScoutApm

app = Flask(__name__)
ScoutApm(app)

app.config["SCOUT_MONITOR"] = True
app.config["SCOUT_KEY"] = "[YOUR KEY FROM SCOUT UI]"
app.config["SCOUT_NAME"] = "My Flask App"
  1. Deploy.

How do I install Scout for FastAPI?

  1. Install the package:
pip install scout-apm
  1. Attach the Scout middleware:
from fastapi import FastAPI
from scout_apm.api import Config
from scout_apm.async_.starlette import ScoutMiddleware

Config.set(
    key="[YOUR KEY FROM SCOUT UI]",
    name="My FastAPI App",
    monitor=True,
)
app = FastAPI()
app.add_middleware(ScoutMiddleware)
  1. Deploy.

How do I configure Scout on Heroku?

Scout works on Heroku without special configuration. Use environment variables:

heroku config:set SCOUT_NAME='My Heroku App'

If using the Heroku Add-on, SCOUT_MONITOR and SCOUT_KEY are set automatically. You only need to add SCOUT_NAME.

Does Scout work with Docker?

Yes. Scout runs in Docker containers without special configuration. Consider using the Scout core-agent Docker image for easier container orchestration.

Ready to Optimize Your App?

Join engineering teams who trust Scout Monitoring for hassle-free performance monitoring. With our 3-step setup, powerful tooling, and responsive support, you can quickly identify and fix performance issues before they impact your users.