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

Uploaded Python 3

File details

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

File metadata

  • Download URL: vblf-0.3.0.tar.gz
  • Upload date:
  • Size: 50.0 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.0.tar.gz
Algorithm Hash digest
SHA256 002f3474875b06fdbf96c0fb0af7f37e40a878d83b4bf018188c22820abe5a4e
MD5 4f01aed2e255854fdadad92aad8156d6
BLAKE2b-256 ddbac44fcd3fd4f2c05e4e4ebabf2954cad8f12e307e0e9ce68299abdc4c3523

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: vblf-0.3.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d300287e3c967c06ee62194b6a36ab8393861ac4e4718f8938fb1b2d233fa766
MD5 c6253cef25c3b735f979335de256036b
BLAKE2b-256 564b388984d21b6bb6b521244f1681d14006c8925a54181a1d9e158094d06b7f

See more details on using hashes here.

Provenance

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