Create AppMap files by recording a Python application.
Project description
About
appmap-python is a Python package for recording
AppMaps of your code. "AppMap" is a data format
which records code structure (modules, classes, and methods), code execution events
(function calls and returns), and code metadata (repo name, repo URL, commit SHA, labels,
etc). It's more granular than a performance profile, but it's less granular than a full
debug trace. It's designed to be optimal for understanding the design intent and structure
of code and key data flows.
Usage
Visit the AppMap for Python reference page on AppLand.com for a complete reference guide.
Development
Getting the code
Clone the repo to begin development.
% git clone https://github.com/applandinc/appmap-python.git
Cloning into 'appmap-python'...
remote: Enumerating objects: 167, done.
remote: Counting objects: 100% (167/167), done.
remote: Compressing objects: 100% (100/100), done.
remote: Total 962 (delta 95), reused 116 (delta 61), pack-reused 795
Receiving objects: 100% (962/962), 217.31 KiB | 4.62 MiB/s, done.
Resolving deltas: 100% (653/653), done.
Python version support
As a package intended to be installed in as many environments as possible, appmap-python
needs to avoid using features of Python or the standard library that were added after the
oldest version currently supported (see the
supported versions).
Dependency management
uv is used for dependency management and provides fast package installation:
# Install uv (macOS/Linux)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install dependencies
cd appmap-python
uv sync --all-extras
wrapt
The one dependency that is not managed using uv is wrapt. Because it's possible that
projects that use appmap may also need an unmodified version of wrapt (e.g. pylint depends on
astroid, which in turn depends on wrapt), we use
vendoring to vendor wrapt.
To update wrapt, use tox (described below) to run the vendoring environment.
Linting
pylint for linting:
cd appmap-python
uv run tox -e lint
# Or run pylint directly
uv run pylint appmap
--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)
Testing
pytest
pytest for testing:
cd appmap-python
# Run all tests
APPMAP_DISPLAY_PARAMS=true uv run appmap-python pytest
# Run tests with a specific Python version
APPMAP_DISPLAY_PARAMS=true uv run --python 3.9 appmap-python pytest
# Run tests in parallel
APPMAP_DISPLAY_PARAMS=true uv run appmap-python pytest -n auto
tox
The tox configuration provides the ability to run the tests for all supported versions of Python and web frameworks (Django, Flask, SQLAlchemy).
With uv, you don't need to pre-install Python versions - uv will automatically download and manage them:
cd appmap-python
# Run full test matrix (all Python versions and frameworks)
uv run tox
# Run tests for a specific Python version
uv run tox -e py312-web
# Run tests for specific framework
uv run tox -e py312-django5
# Update vendored wrapt dependency
uv run tox -e vendoring sync
Code Coverage
coverage for coverage:
cd appmap-python
uv run coverage run -m pytest
uv run coverage html
open htmlcov/index.html
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file appmap-2.2.0.tar.gz.
File metadata
- Download URL: appmap-2.2.0.tar.gz
- Upload date:
- Size: 127.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59448b8bcf9adc6da1f4e6a2e78e235dcd5e6ea1e94315fdbc66641ce9b23b72
|
|
| MD5 |
a564a552f18a5182cdebf546018255a8
|
|
| BLAKE2b-256 |
925b78603a07831544f61ae11ed406c246bb49969890db2851b137cd5e8d8124
|
Provenance
The following attestation bundles were made for appmap-2.2.0.tar.gz:
Publisher:
release.yml on getappmap/appmap-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
appmap-2.2.0.tar.gz -
Subject digest:
59448b8bcf9adc6da1f4e6a2e78e235dcd5e6ea1e94315fdbc66641ce9b23b72 - Sigstore transparency entry: 1235952897
- Sigstore integration time:
-
Permalink:
getappmap/appmap-python@453b697512f04d235e09629b582d1a12f1dac2cc -
Branch / Tag:
refs/heads/master - Owner: https://github.com/getappmap
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@453b697512f04d235e09629b582d1a12f1dac2cc -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file appmap-2.2.0-py3-none-any.whl.
File metadata
- Download URL: appmap-2.2.0-py3-none-any.whl
- Upload date:
- Size: 87.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
854b133f544110d745943d573faed0a981032e9cb0b24acd03694a81433c3963
|
|
| MD5 |
93fcc74084c5e0c1058e821663afde7c
|
|
| BLAKE2b-256 |
83de0aa6a03c851b6b9ff8e9a7fce96629a13dd1d97da4843a2a848b8e0c6548
|
Provenance
The following attestation bundles were made for appmap-2.2.0-py3-none-any.whl:
Publisher:
release.yml on getappmap/appmap-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
appmap-2.2.0-py3-none-any.whl -
Subject digest:
854b133f544110d745943d573faed0a981032e9cb0b24acd03694a81433c3963 - Sigstore transparency entry: 1235952923
- Sigstore integration time:
-
Permalink:
getappmap/appmap-python@453b697512f04d235e09629b582d1a12f1dac2cc -
Branch / Tag:
refs/heads/master - Owner: https://github.com/getappmap
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@453b697512f04d235e09629b582d1a12f1dac2cc -
Trigger Event:
workflow_run
-
Statement type: