advanced.py 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. """Maintainer / advanced SDK surface.
  2. Algorithm code should import from `hth_sdk` only.
  3. """
  4. from hth_sdk.batch import ActionBatchBuilder
  5. from hth_sdk.client import HthClient, connect, connect_control, connect_observe
  6. from hth_sdk.constants import API_VERSION, DEFAULT_CONTROL_SOCKET, DEFAULT_OBSERVE_SOCKET
  7. from hth_sdk.exceptions import (
  8. ActionRejected,
  9. ApiVersionMismatch,
  10. ConfirmationNotProven,
  11. DataGap,
  12. DeviceEpochChanged,
  13. HthError,
  14. InvalidResumePoint,
  15. LeaseError,
  16. LeaseExpired,
  17. LeaseMismatch,
  18. StubsNotGenerated,
  19. TransportError,
  20. )
  21. from hth_sdk.lease import ControlLease
  22. from hth_sdk.mock import MockClient
  23. from hth_sdk.replay import ReplayClient
  24. from hth_sdk.types import (
  25. ActionBatch,
  26. ActionRecord,
  27. ActionResult,
  28. Capabilities,
  29. DeliveryGap,
  30. DeviceInfo,
  31. Event,
  32. Measurement,
  33. Snapshot,
  34. TelemetryEvent,
  35. )
  36. __all__ = [
  37. "API_VERSION",
  38. "DEFAULT_CONTROL_SOCKET",
  39. "DEFAULT_OBSERVE_SOCKET",
  40. "ActionBatch",
  41. "ActionBatchBuilder",
  42. "ActionRecord",
  43. "ActionRejected",
  44. "ActionResult",
  45. "ApiVersionMismatch",
  46. "Capabilities",
  47. "ConfirmationNotProven",
  48. "ControlLease",
  49. "DataGap",
  50. "DeliveryGap",
  51. "DeviceEpochChanged",
  52. "DeviceInfo",
  53. "Event",
  54. "HthClient",
  55. "HthError",
  56. "InvalidResumePoint",
  57. "LeaseError",
  58. "LeaseExpired",
  59. "LeaseMismatch",
  60. "Measurement",
  61. "MockClient",
  62. "ReplayClient",
  63. "Snapshot",
  64. "StubsNotGenerated",
  65. "TelemetryEvent",
  66. "TransportError",
  67. "connect",
  68. "connect_control",
  69. "connect_observe",
  70. ]