Coverage for src / bluetooth_sig / __init__.py: 81%
16 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-18 11:17 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-18 11:17 +0000
1"""Bluetooth SIG Standards Library for pure SIG standard interpretation.
3A framework-agnostic library for parsing and interpreting Bluetooth SIG
4standards, including GATT characteristics, services, and UUID resolution.
5"""
7from __future__ import annotations
9import subprocess
10from pathlib import Path
12# Primary API
13from .core.async_context import AsyncParsingSession
14from .core.translator import BluetoothSIGTranslator
15from .device.device import Device
17# Essential types for type hints
18from .types.base_types import SIGInfo
19from .types.data_types import CharacteristicInfo, ServiceInfo, ValidationResult
21# Consumer utilities
22from .utils.prewarm import prewarm_registries
23from .utils.values import is_struct_value, to_primitive
25try:
26 from ._version import __version__
27except ImportError:
28 _version_result = subprocess.run(
29 ["git", "describe", "--tags"],
30 capture_output=True,
31 text=True,
32 check=True,
33 cwd=Path(__file__).parent.parent.parent,
34 )
35 __version__ = _version_result.stdout.strip().lstrip("v")
37__all__ = [
38 # Primary API
39 "AsyncParsingSession",
40 "BluetoothSIGTranslator",
41 # Essential types for type hints
42 "CharacteristicInfo",
43 "Device",
44 "SIGInfo",
45 "ServiceInfo",
46 "ValidationResult",
47 # Consumer utilities
48 "is_struct_value",
49 "prewarm_registries",
50 "to_primitive",
51 # Version
52 "__version__",
53]