Python library for the digitalSTROM vDC API
Project description
pydsvdcapi
Python library for the digitalSTROM virtual Device Connector (vDC) API.
What this library does
- Implements the full vDC protobuf protocol over TCP
- Manages the session lifecycle (hello/pong, announcement, reconnect)
- Models all device classes: lights, blinds, sensors, buttons, heating, audio, and more
- Provides a composable API:
VdcHost→Vdc→Vdsd→ components - Persists device state across restarts via a YAML property store
- Automatically derives
modelFeaturesflags from configured components - Supports value converters for uplink/downlink data transformation
Installation
pip install pydsvdcapi
Requires Python 3.10+.
Quick start
import asyncio
from pydsvdcapi import (
VdcHost, Vdc, Device, Vdsd,
DsUid, DsUidNamespace,
Output, OutputFunction, OutputMode, OutputUsage,
ColorGroup,
)
async def main():
host = VdcHost(dsuid=DsUid.new_uuid_based(), name="My VDC Host")
vdc = Vdc(dsuid=DsUid.new_uuid_based(), name="My VDC")
host.add_vdc(vdc)
device = Device(dsuid=DsUid.new_gtin_based("0000000000001", 0))
vdsd = Vdsd(dsuid=DsUid.new_uuid_based(), name="My Light")
output = Output(
function=OutputFunction.LIGHT,
mode=OutputMode.SWITCH,
usage=OutputUsage.ROOM,
group=ColorGroup.YELLOW,
)
vdsd.set_output(output)
device.add_vdsd(vdsd)
vdc.add_device(device)
await host.run() # connects and blocks until stopped
asyncio.run(main())
See examples/getting_started.py for a minimal runnable example
and examples/full_showcase.py for all 27 device classes.
Development
git clone https://github.com/KarlKiel/pyDSvDCAPI.git
cd pyDSvDCAPI
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
| Command | Purpose |
|---|---|
python -m pytest |
Run tests |
ruff check src/ tests/ |
Lint |
ruff format src/ tests/ |
Format |
mypy src/pydsvdcapi |
Type-check |
See CONTRIBUTING.md for full guidance.
Documentation
API reference: pydsvdcapi.readthedocs.io
Domain documentation lives in docs/:
License
GPLv3 — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pydsvdcapi-0.8.0.tar.gz.
File metadata
- Download URL: pydsvdcapi-0.8.0.tar.gz
- Upload date:
- Size: 275.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f52977e169290816dd38b7dfd2e88291585d8aef6e3fc61c4e6095c29b1c54f2
|
|
| MD5 |
7dd7b985e98bbe00a5b372d1a3805564
|
|
| BLAKE2b-256 |
ad6896187c372869afb77f9a38944b60909c964c5f2b94fc4529d51014682323
|
Provenance
The following attestation bundles were made for pydsvdcapi-0.8.0.tar.gz:
Publisher:
publish.yml on KarlKiel/pyDSvDCAPI
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydsvdcapi-0.8.0.tar.gz -
Subject digest:
f52977e169290816dd38b7dfd2e88291585d8aef6e3fc61c4e6095c29b1c54f2 - Sigstore transparency entry: 1438656161
- Sigstore integration time:
-
Permalink:
KarlKiel/pyDSvDCAPI@0bb16c2f37d5864cc6018caa0b60de823dc653fb -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/KarlKiel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0bb16c2f37d5864cc6018caa0b60de823dc653fb -
Trigger Event:
push
-
Statement type:
File details
Details for the file pydsvdcapi-0.8.0-py3-none-any.whl.
File metadata
- Download URL: pydsvdcapi-0.8.0-py3-none-any.whl
- Upload date:
- Size: 181.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e03bec3e47493a0fff82ac516b9ac09166ad49e5423a2b75a30354a976713f97
|
|
| MD5 |
326d38dea9bf82ec8f597f95c18717bf
|
|
| BLAKE2b-256 |
55a2c1eb48f6b631c1c864531ac86d9d19697a2250ece4d7803d9471b2fd27da
|
Provenance
The following attestation bundles were made for pydsvdcapi-0.8.0-py3-none-any.whl:
Publisher:
publish.yml on KarlKiel/pyDSvDCAPI
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydsvdcapi-0.8.0-py3-none-any.whl -
Subject digest:
e03bec3e47493a0fff82ac516b9ac09166ad49e5423a2b75a30354a976713f97 - Sigstore transparency entry: 1438656253
- Sigstore integration time:
-
Permalink:
KarlKiel/pyDSvDCAPI@0bb16c2f37d5864cc6018caa0b60de823dc653fb -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/KarlKiel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0bb16c2f37d5864cc6018caa0b60de823dc653fb -
Trigger Event:
push
-
Statement type: