A standalone, host-agnostic Python library for KNX telegram persistence.
Project description
knx-telegram-store
A standalone, host-agnostic Python library for KNX telegram persistence.
Features
- Canonical Data Model: A unified model for KNX telegrams shared between Home Assistant and SpectrumKNX.
- Pluggable Backends:
- In-Memory: Fast, deque-based storage with full filtering support.
- SQLite: Lightweight persistent storage with SQL-based filtering.
- PostgreSQL + TimescaleDB: Full-scale time-series storage.
- Unified Query Model: Powerful declarative filtering including time-delta context windows and pagination.
- Zero Runtime Dependencies: Core library (model, interface, in-memory) has no dependencies.
- Automated Schema Management: SQL backends handle their own creation and upgrades.
Installation
pip install knx-telegram-store
For SQL support:
pip install knx-telegram-store[sqlite]
pip install knx-telegram-store[postgres]
Usage
from datetime import datetime
from knx_telegram_store import StoredTelegram, TelegramQuery
from knx_telegram_store.backends.memory import MemoryStore
async def main():
store = MemoryStore(max_size=1000)
await store.initialize()
telegram = StoredTelegram(
timestamp=datetime.now(),
source="1.1.1",
destination="1/1/1",
telegramtype="GroupValueWrite",
direction="Incoming",
value=22.5,
unit="°C"
)
await store.store(telegram)
query = TelegramQuery(destinations=["1/1/1"])
result = await store.query(query)
for t in result.telegrams:
print(f"{t.timestamp}: {t.source} -> {t.destination} | {t.value} {t.unit}")
await store.close()
License
MIT
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 knx_telegram_store-0.1.0.tar.gz.
File metadata
- Download URL: knx_telegram_store-0.1.0.tar.gz
- Upload date:
- Size: 11.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 |
f3a0f27fbee908be170dd16c99eee17b51e09eed736e557b3bf5de36421299f7
|
|
| MD5 |
20d0a821a5213d1cf7ef4a15ba80d971
|
|
| BLAKE2b-256 |
f0d7a5a2c95ecdc1209c9387fe7420cb0930aaafcf2654e6c7c5ffd3f5cb4799
|
Provenance
The following attestation bundles were made for knx_telegram_store-0.1.0.tar.gz:
Publisher:
publish.yml on XKNX/knx-telegram-store
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
knx_telegram_store-0.1.0.tar.gz -
Subject digest:
f3a0f27fbee908be170dd16c99eee17b51e09eed736e557b3bf5de36421299f7 - Sigstore transparency entry: 1422287785
- Sigstore integration time:
-
Permalink:
XKNX/knx-telegram-store@c3027279db9a0c0da27565deb3635c23a0661605 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/XKNX
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c3027279db9a0c0da27565deb3635c23a0661605 -
Trigger Event:
push
-
Statement type:
File details
Details for the file knx_telegram_store-0.1.0-py3-none-any.whl.
File metadata
- Download URL: knx_telegram_store-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.3 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 |
58c215b4d41258f92123cc3278e8696fa90fda9833762344405ebf56574e346b
|
|
| MD5 |
64c23e8ebc2f53b27ae89aca4098b1ce
|
|
| BLAKE2b-256 |
5774faf86eb5121224b874176426387ab0a3b3b43bb49f95531f780e3d06556a
|
Provenance
The following attestation bundles were made for knx_telegram_store-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on XKNX/knx-telegram-store
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
knx_telegram_store-0.1.0-py3-none-any.whl -
Subject digest:
58c215b4d41258f92123cc3278e8696fa90fda9833762344405ebf56574e346b - Sigstore transparency entry: 1422287873
- Sigstore integration time:
-
Permalink:
XKNX/knx-telegram-store@c3027279db9a0c0da27565deb3635c23a0661605 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/XKNX
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c3027279db9a0c0da27565deb3635c23a0661605 -
Trigger Event:
push
-
Statement type: