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.3.1.tar.gz (50.1 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.3.1-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for vblf-0.3.1.tar.gz
Algorithm Hash digest
SHA256 4fd0f463668b8a456e75e1189836bf9e0120d5ca7ace42a8f9c193c0d538f5f5
MD5 88f398b7739ebaff8f1965003010b0fa
BLAKE2b-256 fe54f2c8f1c53c6e4b573487e672b2085720528d302599800df4cc3fcbfd2e98

See more details on using hashes here.

Provenance

The following attestation bundles were made for vblf-0.3.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.3.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for vblf-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f21a4acf44e0c79e66834f42f0256fdb1c3012ef9b8f71234aa12178ebba5acf
MD5 3f4d5318ad8a5411ffe86613c0375c3d
BLAKE2b-256 5ffb09dc22f166272165d307e26123fa145980a01237016e35cafd8ee038a18b

See more details on using hashes here.

Provenance

The following attestation bundles were made for vblf-0.3.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