Installation steps
Install the Atatus python agent:
Option 1: Install the agent using pip.
copypip install atatus
Option 2: Add
atatus
to your project's requirements.txt file, and install the agent using pip.copy# requirements.txt atatus
copypip install -r requirements.txt
Add Atatus configuration to
main.py
file.copy# main.py from fastapi import FastAPI import atatus from atatus.contrib.starlette import create_client, Atatus atatus_client = atatus.get_client() if atatus_client is None: atatus_client = create_client({ 'APP_NAME': 'FastAPI App', 'LICENSE_KEY': 'lic_apm_xxxxxxx', }) app = FastAPI() app.add_middleware(Atatus, client=atatus_client)
Restart your FastAPI server