Skip to main content

A minimal Perfetto trace generation library for retrocomputer emulators

Project description

retrobus-perfetto Python Implementation

This directory contains the Python implementation of retrobus-perfetto.

Installation

From the py/ directory:

# For development
pip install -e ".[dev]"

# For regular use
pip install .

# From PyPI (once published)
pip install retrobus-perfetto

Development

Running Tests

pytest

Running Linter

ruff check .

Running Type Checker

mypy retrobus_perfetto --config-file mypy.ini

Building Package

python -m build

Usage

Basic Usage

from retrobus_perfetto import PerfettoTraceBuilder

# Create a trace
builder = PerfettoTraceBuilder("MyEmulator")
# ... add events ...
trace_data = builder.build()

Direct Proto Access

The package also provides direct access to the generated protobuf modules:

# Import the proto module
from retrobus_perfetto.proto import perfetto_pb2

# Create proto objects directly
trace = perfetto_pb2.Trace()
# ... manipulate trace ...

Project Structure

  • retrobus_perfetto/ - Main package source code
    • builder.py - Main trace builder class
    • annotations.py - Annotation helper classes
    • proto/ - Generated protobuf files (created during build)
      • perfetto_pb2.py - Generated Perfetto protobuf definitions
  • tests/ - Unit tests
  • example.py - Example usage
  • pyproject.toml - Package configuration

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

retrobus_perfetto-0.3.0.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

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

retrobus_perfetto-0.3.0-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file retrobus_perfetto-0.3.0.tar.gz.

File metadata

  • Download URL: retrobus_perfetto-0.3.0.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for retrobus_perfetto-0.3.0.tar.gz
Algorithm Hash digest
SHA256 22d7a64276384260fa77756783e3b98550a6b3f3353ebf92e3a9a3ae418865ed
MD5 f85c4fddf0b81ec880cdddafe9b95d5a
BLAKE2b-256 4f4c8ac1a0a7c341891caf04c0c467da4721d0dedf355f53e2939bfec2079b2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for retrobus_perfetto-0.3.0.tar.gz:

Publisher: publish.yml on mblsha/retrobus-perfetto

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

File details

Details for the file retrobus_perfetto-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for retrobus_perfetto-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e1b28278d156b59607ab64795227c14872dc1327b32c13d42ca6c2b1ef15f6a7
MD5 1d0d7f51a60f467e63ef8e894e6fc66a
BLAKE2b-256 32ce3b7b67185506397ce606874317f110d09726c824f913ec4d09c38a07aff3

See more details on using hashes here.

Provenance

The following attestation bundles were made for retrobus_perfetto-0.3.0-py3-none-any.whl:

Publisher: publish.yml on mblsha/retrobus-perfetto

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