Coverage for src / bluetooth_sig / __init__.py: 79%

14 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-01-11 20:14 +0000

1"""Bluetooth SIG Standards Library for pure SIG standard interpretation. 

2 

3A framework-agnostic library for parsing and interpreting Bluetooth SIG 

4standards, including GATT characteristics, services, and UUID resolution. 

5""" 

6 

7from __future__ import annotations 

8 

9import subprocess 

10from pathlib import Path 

11 

12# Primary API 

13from .core.async_context import AsyncParsingSession 

14from .core.translator import BluetoothSIGTranslator 

15from .device.device import Device 

16 

17# Essential types for type hints 

18from .types.base_types import SIGInfo 

19from .types.data_types import CharacteristicInfo, ServiceInfo, ValidationResult 

20 

21try: 

22 from ._version import __version__ 

23except ImportError: 

24 _version_result = subprocess.run( 

25 ["git", "describe", "--tags"], 

26 capture_output=True, 

27 text=True, 

28 check=True, 

29 cwd=Path(__file__).parent.parent.parent, 

30 ) 

31 __version__ = _version_result.stdout.strip().lstrip("v") 

32 

33__all__ = [ 

34 # Primary API 

35 "BluetoothSIGTranslator", 

36 "AsyncParsingSession", 

37 "Device", 

38 # Essential types for type hints 

39 "CharacteristicInfo", 

40 "ServiceInfo", 

41 "ValidationResult", 

42 "SIGInfo", 

43 # Version 

44 "__version__", 

45]