Skip to main content

Low-level Rust-backed Python module for CodeTracer recording (PyO3)

Project description

Codetracer Python Recorder

codetracer-python-recorder is the Rust-backed recorder module that powers Python tracing inside Codetracer. The PyO3 extension exposes a small Python façade so packaged environments (desktop bundles, uv run, virtualenvs) can start and stop recording without shipping an additional interpreter.

Installation

codetracer-python-recorder publishes binary wheels for CPython 3.12 and 3.13 on Linux (manylinux2014 x86_64/aarch64), macOS 11+ universal2 (arm64 + x86_64), and Windows 10+ (win_amd64). Install the package into the interpreter you plan to trace:

python -m pip install codetracer-python-recorder

Source distributions are available for audit and custom builds; maturin and a Rust toolchain are required when building from source.

Command-line entry point

The wheel installs a console script named codetracer-python-recorder and the package can also be invoked with python -m codetracer_python_recorder. Both forms share the same arguments:

python -m codetracer_python_recorder \
  --trace-dir ./trace-out \
  --format json \
  --activation-path app/main.py \
  --with-diff \
  app/main.py --arg=value
  • --trace-dir (default: ./trace-out) – directory that will receive trace.json, trace_metadata.json, and trace_paths.json.
  • --format – trace serialisation format (binary or json). Use json for integration with the DB backend importer.
  • --activation-path – optional gate that postpones tracing until the interpreter executes this file (defaults to the target script).
  • --with-diff / --no-with-diff – records the caller’s preference in trace_metadata.json. The desktop Codetracer CLI is responsible for generating diff artefacts; the recorder simply surfaces the flag.

All additional arguments are forwarded to the target script unchanged. The CLI reuses whichever interpreter launches it so wrappers such as uv run, pipx, or activated virtual environments behave identically to python script.py.

Packaging expectations

Desktop installers add the wheel to PYTHONPATH before invoking the user’s interpreter. When embedding the recorder elsewhere, ensure the wheel (or its extracted site-packages directory) is discoverable on sys.path and run the CLI with the interpreter you want to trace.

The CLI writes recorder metadata into trace_metadata.json describing the wheel version, target script, and diff preference so downstream tooling can make decisions without re-running the trace.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codetracer_python_recorder-0.1.0.tar.gz (49.0 kB view details)

Uploaded Source

Built Distributions

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

codetracer_python_recorder-0.1.0-cp313-cp313-win_amd64.whl (834.0 kB view details)

Uploaded CPython 3.13Windows x86-64

codetracer_python_recorder-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

codetracer_python_recorder-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (936.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

codetracer_python_recorder-0.1.0-cp313-cp313-macosx_11_0_arm64.whl (841.9 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

codetracer_python_recorder-0.1.0-cp313-cp313-macosx_10_12_x86_64.whl (903.4 kB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

codetracer_python_recorder-0.1.0-cp312-cp312-win_amd64.whl (834.1 kB view details)

Uploaded CPython 3.12Windows x86-64

codetracer_python_recorder-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

codetracer_python_recorder-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (936.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

codetracer_python_recorder-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (842.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

codetracer_python_recorder-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl (903.7 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

Details for the file codetracer_python_recorder-0.1.0.tar.gz.

File metadata

File hashes

Hashes for codetracer_python_recorder-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5ca97980e0cba77921324b210cf8f350a2d4e5442298630eb0e028110ac4ebf8
MD5 7120d378fcb9aedd4c87a0f5bdaf7479
BLAKE2b-256 24c078af9fe934846163eca36fcb3096eb97cfdfc44796853a0bbe8d25cdcc0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for codetracer_python_recorder-0.1.0.tar.gz:

Publisher: recorder-release.yml on metacraft-labs/codetracer-python-recorder

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

File details

Details for the file codetracer_python_recorder-0.1.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for codetracer_python_recorder-0.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6a66069f83776f002b59c6e07c73265c4cf0b40fb8926755fdb0e948083e4071
MD5 170c7f019bee93ac49549334db740256
BLAKE2b-256 44f1c6c19cd7f3e89d2c2145a17244701c5426ce593c997a84f18d62bef26d42

See more details on using hashes here.

Provenance

The following attestation bundles were made for codetracer_python_recorder-0.1.0-cp313-cp313-win_amd64.whl:

Publisher: recorder-release.yml on metacraft-labs/codetracer-python-recorder

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

File details

Details for the file codetracer_python_recorder-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for codetracer_python_recorder-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 274ad54af4f27661fbe78ba910a28efb463dc45a5c122273ce1284ad710f4cc7
MD5 70e6c1d2defb771d035dc8ea9e0e9162
BLAKE2b-256 e55ef8c77b1ae7c89d7e281c3b56fb89cf7a58900ff40986f7286d601ede6317

See more details on using hashes here.

Provenance

The following attestation bundles were made for codetracer_python_recorder-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: recorder-release.yml on metacraft-labs/codetracer-python-recorder

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

File details

Details for the file codetracer_python_recorder-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for codetracer_python_recorder-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d2fb089439ad56bbc4b9b027e564d3836079803764620aed604f3e11007971bf
MD5 4ebf4a48f45971493320ec4a54bfe25b
BLAKE2b-256 41046a10bfee0edc4927bbfcffcca53f7cf696c876b89d5d5c84ef59529ef535

See more details on using hashes here.

Provenance

The following attestation bundles were made for codetracer_python_recorder-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: recorder-release.yml on metacraft-labs/codetracer-python-recorder

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

File details

Details for the file codetracer_python_recorder-0.1.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for codetracer_python_recorder-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c1d52662c4145ded35fd521f7122e24e07433ecbbad6072474b8898cf01ea915
MD5 67e65df082ff333aeb2bdba31da4f69d
BLAKE2b-256 b0b8de716b919efa1e1e53cbc8f9fb90ebaa5edfafe248c61bb4df9cd6745efe

See more details on using hashes here.

Provenance

The following attestation bundles were made for codetracer_python_recorder-0.1.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: recorder-release.yml on metacraft-labs/codetracer-python-recorder

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

File details

Details for the file codetracer_python_recorder-0.1.0-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for codetracer_python_recorder-0.1.0-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 107ddaf6716341b15f7b2c568c6e50a4edd3af4523fec4529069da4a5ce23452
MD5 b104df1efe9c2c83fcf6272b5a5c502f
BLAKE2b-256 3526cc95e4803d1a263206674c42ac1f7e8ad3d427b224acb6e6a1cb04da3b1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for codetracer_python_recorder-0.1.0-cp313-cp313-macosx_10_12_x86_64.whl:

Publisher: recorder-release.yml on metacraft-labs/codetracer-python-recorder

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

File details

Details for the file codetracer_python_recorder-0.1.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for codetracer_python_recorder-0.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 865d4a4c4bb8d40d2d54d4d4d39b29e193d4ced066233ed4485c8002b197bb6e
MD5 bdc47dbe09bfd8bd29752c598f3c3ae3
BLAKE2b-256 dfa291387b5c72d2fc061b408e54d3533202829c040ed3baea27d5055696018b

See more details on using hashes here.

Provenance

The following attestation bundles were made for codetracer_python_recorder-0.1.0-cp312-cp312-win_amd64.whl:

Publisher: recorder-release.yml on metacraft-labs/codetracer-python-recorder

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

File details

Details for the file codetracer_python_recorder-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for codetracer_python_recorder-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ce309f65ee0550d7b8e96b4042031926024adcd290d8b9114808a03fd47686fa
MD5 607934014fb2bf525512f38f5caf1d21
BLAKE2b-256 fb5421f0f6f6f29afae6447f5dae92842097873261aa4960a9984553f0ab9bde

See more details on using hashes here.

Provenance

The following attestation bundles were made for codetracer_python_recorder-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: recorder-release.yml on metacraft-labs/codetracer-python-recorder

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

File details

Details for the file codetracer_python_recorder-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for codetracer_python_recorder-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9fd1b92d2a379180ccb6e185191e1fb552c64beeb67d1d4986f8a23258a1e53d
MD5 74f58d53758d6256bb68393fd47f520c
BLAKE2b-256 8ebb983567a0d4b49d1a8b5e7b38896584d20c916dd20942af806778df9b2b56

See more details on using hashes here.

Provenance

The following attestation bundles were made for codetracer_python_recorder-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: recorder-release.yml on metacraft-labs/codetracer-python-recorder

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

File details

Details for the file codetracer_python_recorder-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for codetracer_python_recorder-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d6ef845f438d3226f30abe790832170a5e1703cf030b03bebedfe379839d956d
MD5 a3ea3c60c5a8d138c8cb967d5f8b6e2b
BLAKE2b-256 7e990173424e48cf1d12be5fc09902a16f668f2e4a44949ef9df035a4741717e

See more details on using hashes here.

Provenance

The following attestation bundles were made for codetracer_python_recorder-0.1.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: recorder-release.yml on metacraft-labs/codetracer-python-recorder

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

File details

Details for the file codetracer_python_recorder-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for codetracer_python_recorder-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 bd0939fd4187febfdd081ef35d12d37145d680e1e2d3da22be800cfc01ed2a1d
MD5 f90bb676ea65380cb224208627d13cba
BLAKE2b-256 8041b0a70d6cad1c287b1d1599060023aa14f97ca387de022a6b48e6bb893de6

See more details on using hashes here.

Provenance

The following attestation bundles were made for codetracer_python_recorder-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl:

Publisher: recorder-release.yml on metacraft-labs/codetracer-python-recorder

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