__init__.py 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. """hth-sdk — Python client for the hth Linux userspace hood API.
  2. Public surface is async (`grpc.aio`) plus an in-process MockClient.
  3. This package does not open serial ports and does not implement models.
  4. """
  5. from __future__ import annotations
  6. from hth_sdk.batch import ActionBatchBuilder
  7. from hth_sdk.client import HthClient, connect, connect_control, connect_observe
  8. from hth_sdk.constants import (
  9. API_VERSION,
  10. DEFAULT_CONTROL_SOCKET,
  11. DEFAULT_OBSERVE_SOCKET,
  12. )
  13. from hth_sdk.exceptions import (
  14. ActionRejected,
  15. ApiVersionMismatch,
  16. ConfirmationNotProven,
  17. DataGap,
  18. DeviceEpochChanged,
  19. HthError,
  20. InvalidResumePoint,
  21. LeaseError,
  22. LeaseExpired,
  23. LeaseMismatch,
  24. StubsNotGenerated,
  25. TransportError,
  26. )
  27. from hth_sdk.lease import ControlLease
  28. from hth_sdk.mock import MockClient
  29. from hth_sdk.types import (
  30. ActionBatch,
  31. ActionRecord,
  32. ActionResult,
  33. ActionResultEvent,
  34. Capabilities,
  35. DeliveryGap,
  36. DeviceInfo,
  37. Event,
  38. FaultEvent,
  39. FieldAudit,
  40. HeartbeatEvent,
  41. Measurement,
  42. SafetyModeEvent,
  43. Snapshot,
  44. SnapshotEvent,
  45. TelemetryEvent,
  46. )
  47. __all__ = [
  48. "API_VERSION",
  49. "DEFAULT_CONTROL_SOCKET",
  50. "DEFAULT_OBSERVE_SOCKET",
  51. "ActionBatch",
  52. "ActionBatchBuilder",
  53. "ActionRejected",
  54. "ActionResult",
  55. "ApiVersionMismatch",
  56. "Capabilities",
  57. "ConfirmationNotProven",
  58. "ControlLease",
  59. "DataGap",
  60. "DeviceEpochChanged",
  61. "DeviceInfo",
  62. "HthClient",
  63. "HthError",
  64. "SnapshotEvent",
  65. "SafetyModeEvent",
  66. "InvalidResumePoint",
  67. "HeartbeatEvent",
  68. "FieldAudit",
  69. "FaultEvent",
  70. "Event",
  71. "DeliveryGap",
  72. "ActionResultEvent",
  73. "ActionRecord",
  74. "LeaseError",
  75. "LeaseExpired",
  76. "LeaseMismatch",
  77. "Measurement",
  78. "MockClient",
  79. "Snapshot",
  80. "StubsNotGenerated",
  81. "TelemetryEvent",
  82. "TransportError",
  83. "connect",
  84. "connect_control",
  85. "connect_observe",
  86. ]
  87. __version__ = "0.1.0"