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.2.2.tar.gz (14.2 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.2.2-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for retrobus_perfetto-0.2.2.tar.gz
Algorithm Hash digest
SHA256 ed40905e34bf00daf28b3a8d9e19633965843f25893bac5a6cb7061da834730f
MD5 55b975e0d2394e5cb020a28e5969dddd
BLAKE2b-256 9d5f1494abc9fc24561f34c016b16fa2be29cc147f4d66b334c0b6cca1ea168c

See more details on using hashes here.

Provenance

The following attestation bundles were made for retrobus_perfetto-0.2.2.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.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for retrobus_perfetto-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dfce6e39b8d838289de4932bb8ef74d3b8a5e298464368a5421472263c914548
MD5 54186691138fab3bdd39c54dd9232a19
BLAKE2b-256 897022aab0b50e0a1ff594302d4adb602312ec4a1b926a83a8235b186577c22d

See more details on using hashes here.

Provenance

The following attestation bundles were made for retrobus_perfetto-0.2.2-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