Install AppMap agent for Python

Open Beta

Open a terminal window in the top level folder of your project and run this command:

npx @appland/appmap install-agent

You will be guided through a series of steps for installing and configuring that agent, that will look like this:

$ npx @appland/appmap install
npx: installed 191 in 6.139s
? Select a target language for agent installation. Python
✔ Installing the AppMap agent...

   ╭────────────────────────────────────────────────────────────╮
   │                                                            │
   │       Success! The AppMap agent has been installed.        │
   │                                                            │
   │    Run your tests with APPMAP=true in the environment.     │
   │   By default, AppMap files will be output to tmp/appmap.   │
   │                                                            │
   │                For more information, visit                 │
   │       https://appland.com/docs/reference/appmap-python     │
   │                                                            │
   ╰────────────────────────────────────────────────────────────╯

After you have installed the agent proceed to Record AppMaps.

Manual installation

For installation without Node.js follow this manual installation procedure.

1. Install the AppMap package

Add the appmap package to the requirements file or install it directly with

pip install appmap

For projects that use poetry , add the appmap package to pyproject.toml.

poetry add --dev appmap

2. Create a file named appmap.yml in the root folder of your project

Add your application modules and packages to appmap.yml

name: my_python_app
packages:
- path: module1
- path: module2
- dist: Django
  exclude:
  - django.db

Was this page helpful? thumb_up Yes thumb_down No
Thank you for your feedback!