Skip to main content

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

Build Status

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

appmap-3.0.1.tar.gz (129.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

appmap-3.0.1-py3-none-any.whl (87.9 kB view details)

Uploaded Python 3

File details

Details for the file appmap-3.0.1.tar.gz.

File metadata

  • Download URL: appmap-3.0.1.tar.gz
  • Upload date:
  • Size: 129.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for appmap-3.0.1.tar.gz
Algorithm Hash digest
SHA256 bf61b7693f5c6b6dade6e6f06fd915f8ed7ea0772176ee285b2a97ccd2be9a88
MD5 f0427299a5c41a2c623bd6ab8efc6c22
BLAKE2b-256 93d10347ade599baf7ccc6d8824a682e2f5198380510471b3738b9eff43a8cea

See more details on using hashes here.

Provenance

The following attestation bundles were made for appmap-3.0.1.tar.gz:

Publisher: release.yml on getappmap/appmap-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file appmap-3.0.1-py3-none-any.whl.

File metadata

  • Download URL: appmap-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 87.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for appmap-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3b9a82fa71e5b1d2fe6b6209bfca8449de3086ce8ebecc1cd5c71e2131c659b7
MD5 8aaf9b87d68d4c00c3d7c1b6b7c7ff8b
BLAKE2b-256 4a9b9cb96d156fd749563bc1b15c3df0899a3ca8c0c0619687137fa8bb8bc763

See more details on using hashes here.

Provenance

The following attestation bundles were made for appmap-3.0.1-py3-none-any.whl:

Publisher: release.yml on getappmap/appmap-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page