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.0.tar.gz (128.1 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.0-py3-none-any.whl (87.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: appmap-3.0.0.tar.gz
  • Upload date:
  • Size: 128.1 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.0.tar.gz
Algorithm Hash digest
SHA256 5e296771ef27a2014c6d0940dbd4c7a5cc14e52a4c766c37cac6be083dc135f3
MD5 72f74b5935a40ce8c688a2b9fb264cd9
BLAKE2b-256 73c8660f62c5a6cd8602d22b21180982f10aaea70af482f9369f9254167a9900

See more details on using hashes here.

Provenance

The following attestation bundles were made for appmap-3.0.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: appmap-3.0.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.12

File hashes

Hashes for appmap-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e32db84cd7b7823e3e2ae7fe428f506768d7e78f67317ad684e14c62bef52b92
MD5 4185a696f1f955198b5ed1d0333fd23d
BLAKE2b-256 66035b22dbf661088f535a583eb4914efdc159d328aa22183ae5af4d5fbd793d

See more details on using hashes here.

Provenance

The following attestation bundles were made for appmap-3.0.0-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