Skip to main content

PyVLCB Python Software Library for VLCB

This is a Python library for VLCB (Versatile Layout Control Bus). It implements the core communication protocols defined by the CBUS® protocol and includes extensions for the newer VLCB specifications.

It is designed for use with the MERG CANUSB4 CBUS adapter and other compatible hardware.


Install

Requires Python 3.10 or newer (default on Raspberry Pi OS Bookworm and later).

For most systems including a Raspberry Pi then Python is managed using virtual environment.

Setup a virtual environment:

mkdir ~/venv
python3 -m venv ~/venv/pyvlcb --system-site-packages

Activate the virtual environment:

source ~/venv/pyvlcb/bin/activate

Install the latest release:

pip install pyvlcb

What's New in 0.3.0

  • Added new function to convert dfun to function values
  • Breaking Change: Dropped support for Python 3.9. Python 3.10+ is now required.

Development

The latest source code is available from GitHub. PyVLCB on GitHub.

Installing as a git submodule

To install the library, as a submodule in your own git project repository, then enter your project directory and run:

git submodule add https://github.com/penguintutor/pyvlcb.git lib/pyvlcb
pip install lib/pyvlcb

Note: To use as a submodule, you must create your own git project first and install within the project folder. To update, run git pull and repeat the pip install command.


Library Reference

See the link below for the library reference documentation PyVLCB Library Reference Documentation

Demo examples

Example code is stored within the demo folder available on GitHub. Copy these into your project folder to test the library and connectivity.

  • The demos are created for a Raspberry Pi or other Linux computers.
  • The USB port is hard-coded as /dev/ttyACM0.
  • The Loco ID is hard-coded as 3.
  • For other computers or USB ports, edit the Python file and update the port statement.Example code is stored within the demo folder available from GitHub. Copy these into your project folder to test the library and connectivity.

More Details

  • CBUS® is a registered trademark of Dr. Michael Bolton.
  • This library is an independent implementation based on publicly available protocol documentation and is not officially affiliated with or endorsed by the trademark holder.
  • All other trademarks are the property of their respective owners.

Metadata

Release files for PyVLCB 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyVLCB 0.3.0
File Size Uploaded Provenance Actions
pyvlcb-0.3.0.tar.gz 30.0 kB Without provenance Details for pyvlcb-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for PyVLCB 0.3.0
File Interpreter ABI Platform Actions
pyvlcb-0.3.0-py3-none-any.whl Python 3 none any Details for pyvlcb-0.3.0-py3-none-any.whl

Total release size: 62.9 kB

Release files / pyvlcb-0.3.0.tar.gz

Download URL pyvlcb-0.3.0.tar.gz
Size 30.0 kB
Tags Source
SHA-256 checksum
How to use checksums
27780633e267bf7db5ad391c4ecfff261ba4a436db4c928641c008b06d3424cf
BLAKE2b-256 checksum
How to use checksums
8c4f2026c9a377777e7f60e15dadc41c58d4380f6b7153836b03e1486e14657a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pyvlcb-0.3.0-py3-none-any.whl

Download URL pyvlcb-0.3.0-py3-none-any.whl
Size 32.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
43d06b1e61416ed59c3fcd6aa98d9013fbbeecc3a38d24fa82fb900ab5295602
BLAKE2b-256 checksum
How to use checksums
c0d40da9e3cabd4556c7ada32acfe765a3599eaab1fe692e2f9436921eb5e96a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Security for PyVLCB 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page