Skip to main content

A library to read and write Vector BLF files (binary log format)

Project description

Binary Logging Format Library for Python

PyPI - Version PyPI - Python Version

Introduction

A Python library for reading and writing BLF files, a proprietary binary logging format of Vector Informatik GmbH. BLF files are commonly used in automotive logging and testing scenarios.

Installation

pip install vblf

Usage

Reading BLF Files

from vblf.can import CanMessage, CanMessage2
from vblf.reader import BlfReader

# Open a BLF file
with BlfReader("example.blf") as reader:
    # Iterate through all objects in the file
    for obj in reader:
        print(f"Type: {obj.header.base.object_type.name}")
        print(f"Timestamp: {obj.header.object_time_stamp}")

        # Handle CAN messages
        if isinstance(obj, (CanMessage, CanMessage2)):
            print(f"CAN ID: {obj.id}")
            print(f"Data: {obj.data.hex()}")

Writing BLF Files

from vblf.can import CanMessage
from vblf.writer import BlfWriter

# Create a new BLF file
with BlfWriter("output.blf") as writer:
    # Create a CAN message
    msg = CanMessage(...)

    # Write the message to the file
    writer.write(msg)

License

This project is licensed under the MIT License.

Acknowledgments

  • Vector Informatik GmbH for the BLF file format
  • Tobias Lorenz for his C++ library vector_blf

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

vblf-0.2.1.tar.gz (49.8 kB view details)

Uploaded Source

Built Distribution

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

vblf-0.2.1-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file vblf-0.2.1.tar.gz.

File metadata

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

File hashes

Hashes for vblf-0.2.1.tar.gz
Algorithm Hash digest
SHA256 f6f9a755540d0733240715bf3621525aad355b13bdfa4774c11069b5b7ec7bc0
MD5 1c6f0c7b69f70ad188001beca71fd5e0
BLAKE2b-256 a169f013e65aceffaaca0c2d682f42bae90638cb699ba1b500e4c9f713bbaaa3

See more details on using hashes here.

Provenance

The following attestation bundles were made for vblf-0.2.1.tar.gz:

Publisher: ci.yml on zariiii9003/vblf

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

File details

Details for the file vblf-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: vblf-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vblf-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cafc260488dca00d8f6fd29b8f2a32079310a97572a332db6060f5c52432dc15
MD5 ae7eb3062176c04696cf31a1843619b2
BLAKE2b-256 61707575e8d5df0b0f1ed901c1109e8dcca853ce45f48c16004dfa58268df5b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for vblf-0.2.1-py3-none-any.whl:

Publisher: ci.yml on zariiii9003/vblf

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