Python utilities for reading and writing ASAM OSI trace files (MCAP, binary .osi, text .txth)
Project description
osi-utilities (Python)
Python utilities for reading and writing ASAM OSI (Open Simulation Interface) trace files.
Supported Formats
- MCAP (
.mcap) — Multi-channel container format with metadata - Binary (
.osi) — Single-channel binary format with length-prefixed protobuf messages - Text (
.txth) — Human-readable protobuf TextFormat
Installation
From PyPI:
pip install asam-osi-utilities
For development (uses a virtual environment):
make setup # creates .venv and installs in editable mode
Quick Start
Reading
from osi_utilities.tracefile import open_trace_file
# Read any supported format (auto-detected from extension)
with open_trace_file("trace.mcap") as reader:
for result in reader:
print(result.message_type, result.message)
Writing
from pathlib import Path
from osi3.osi_sensorview_pb2 import SensorView
from osi_utilities.tracefile import BinaryTraceFileWriter
sensor_view = SensorView()
sensor_view.version.version_major = 3
sensor_view.timestamp.seconds = 123
sensor_view.timestamp.nanos = 456
with BinaryTraceFileWriter() as writer:
writer.open(Path("output.osi"))
writer.write_message(sensor_view)
Development
make setup # Create venv and install dependencies
make test # Run tests
make lint # Run linter
make format # Format code
make typecheck # Run type checker
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file asam_osi_utilities-0.3.1.tar.gz.
File metadata
- Download URL: asam_osi_utilities-0.3.1.tar.gz
- Upload date:
- Size: 25.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9dd5515c8f73f1168800ebc5d618cd1194d0a95f3f24ffb07ba1538340c71b4
|
|
| MD5 |
650619a73820672207a88cb99cb574bf
|
|
| BLAKE2b-256 |
e9e75d7f08e0b1fac30c2252a86a3104baa2c8db5b24d686d330fd2b2937b51f
|
Provenance
The following attestation bundles were made for asam_osi_utilities-0.3.1.tar.gz:
Publisher:
cd_release.yml on lichtblick-suite/asam-osi-utilities
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
asam_osi_utilities-0.3.1.tar.gz -
Subject digest:
d9dd5515c8f73f1168800ebc5d618cd1194d0a95f3f24ffb07ba1538340c71b4 - Sigstore transparency entry: 1202892145
- Sigstore integration time:
-
Permalink:
lichtblick-suite/asam-osi-utilities@b7c8603b96ba763dfc5d1ce3ab3eead78a905aa6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/lichtblick-suite
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd_release.yml@b7c8603b96ba763dfc5d1ce3ab3eead78a905aa6 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file asam_osi_utilities-0.3.1-py3-none-any.whl.
File metadata
- Download URL: asam_osi_utilities-0.3.1-py3-none-any.whl
- Upload date:
- Size: 28.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30463ef662a85e0492c9c475bcf1366ad6aa69f4f0f252756f13170aef9e174a
|
|
| MD5 |
1eebec69045ca80ca38bb8e6b0e43d64
|
|
| BLAKE2b-256 |
1fa91b2296bc38138e57f16c5145e74432233d9bfcc4821019da3db828901f69
|
Provenance
The following attestation bundles were made for asam_osi_utilities-0.3.1-py3-none-any.whl:
Publisher:
cd_release.yml on lichtblick-suite/asam-osi-utilities
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
asam_osi_utilities-0.3.1-py3-none-any.whl -
Subject digest:
30463ef662a85e0492c9c475bcf1366ad6aa69f4f0f252756f13170aef9e174a - Sigstore transparency entry: 1202892151
- Sigstore integration time:
-
Permalink:
lichtblick-suite/asam-osi-utilities@b7c8603b96ba763dfc5d1ce3ab3eead78a905aa6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/lichtblick-suite
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd_release.yml@b7c8603b96ba763dfc5d1ce3ab3eead78a905aa6 -
Trigger Event:
workflow_dispatch
-
Statement type: