BAC0
BACnet Scripting Framework for testing DDC Controls
What it is and what it does
BAC0 is a Python framework for building automation system (BAS) programmers who need to interact with BACnet devices, particularly DDC (Direct Digital Control) controllers. It wraps BACpypes3 to provide a high-level asynchronous interface for reading device properties, writing values, and browsing BACnet networks over IP. The library is designed for test-driven development of control sequences—allowing you to simulate sensor inputs using the out_of_service property even when hardware is not connected, making it practical for testing controller logic before deployment.
The package depends on BACpypes3 for protocol handling, colorama for terminal output, python-dotenv for configuration, pytz for timezone support, and aiosqlite for data operations. It targets Python 3.10 and over and has been actively maintained since 2016, with recent updates indicating ongoing development.
Use it for:
- Test DDC controller sequences without physical sensors by writing simulated values to inputs.
- Automate BACnet device discovery and property inspection across a building network.
- Write integration tests for building automation control logic in Python.
- Monitor and log BACnet device state changes over time for diagnostics.
- Prototype building automation workflows before deploying to production controllers.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
BAC0 is an asynchronous Python scripting framework for interacting with BACnet devices over IP networks, enabling you to read properties, write values, and browse BACnet networks using simple Python commands.
Yes, if you work with BACnet devices or building automation systems. The package is actively maintained, has low install friction, carries no known vulnerabilities, and fills a specific niche for BAS programmers. The copyleft license requires you to share modifications but poses no barrier to using it as-is. Not relevant for general Python development outside building automation.
Install
bac0 on PyPI
pip
pip install bac0uv
uv add bac0poetry
poetry add bac0Installing BAC0
Before you install
Low install friction with a pure-wheel distribution. The package is actively maintained with a recent release (19 days old) and steady development activity. Five runtime dependencies are all well-established packages.
License in practice
Licensed under LGPL-3.0 (copyleft). Any derivative work or distribution must preserve the copyleft terms and make source code available under the same license.
Quickstart
pip install bac0
import bac0
from bac0 import connect
# Connect to BACnet network
network = connect()
Requires Python 3.10 or over. BACnet/IP network access and proper network configuration are prerequisites for actual device communication.
Verify before relying
- Whether the package works with Python versions beyond 3.10 or if 3.10 is a hard minimum.
- Specific BACnet device compatibility and any firmware version requirements.
- Whether aiosqlite is used for local data persistence or only for optional features.
Package facts
| License | LGPL-3.0 (copyleft) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — BACpypes3, colorama, python-dotenv, pytz, aiosqlite |
| Maintenance | actively maintained — 19 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 98,010/month — #13,115 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: bac0-2026.7.25-py3-none-any.whl
Keywords: bacnet, building, automation, test
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
bacpypes3BACpypes3 is a Python library for building…
permissive · top 15,000 on PyPI
bacpypesBACpypes implements the BACnet protocol stack…
permissive · top 15,000 on PyPI
PyChromecastCommunicate with Google Chromecast devices over…
permissive · top 15,000 on PyPI
pyisyPyISY is a Python library for asynchronous…
permissive · top 15,000 on PyPI
py-ccm15Provides an async Python interface to…
permissive · top 15,000 on PyPI
python-canProvides Python abstractions and utilities for…
copyleft · top 5,000 on PyPI
aiounifiAsynchronous Python library for communicating…
permissive · top 15,000 on PyPI
pyserial-asyncioAdds async/await support to pyserial for…
permissive · top 15,000 on PyPI
python-izonePython library for controlling iZone air…
copyleft · top 15,000 on PyPI
ncclientncclient is a Python library that implements…
permissive · top 5,000 on PyPI