heimdallpower-api-client 3.9.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. heimdallpower_api_client-3.9.2/PKG-INFO +18 -0
  2. heimdallpower_api_client-3.9.2/heimdall_api_client/__init__.py +4 -0
  3. heimdallpower_api_client-3.9.2/heimdall_api_client/assets.py +17 -0
  4. heimdallpower_api_client-3.9.2/heimdall_api_client/assets_api_client/__init__.py +8 -0
  5. heimdallpower_api_client-3.9.2/heimdall_api_client/assets_api_client/api/__init__.py +1 -0
  6. heimdallpower_api_client-3.9.2/heimdall_api_client/assets_api_client/api/assets/__init__.py +1 -0
  7. heimdallpower_api_client-3.9.2/heimdall_api_client/assets_api_client/api/assets/assets_v1_get_assets.py +190 -0
  8. heimdallpower_api_client-3.9.2/heimdall_api_client/assets_api_client/client.py +268 -0
  9. heimdallpower_api_client-3.9.2/heimdall_api_client/assets_api_client/errors.py +16 -0
  10. heimdallpower_api_client-3.9.2/heimdall_api_client/assets_api_client/models/__init__.py +27 -0
  11. heimdallpower_api_client-3.9.2/heimdall_api_client/assets_api_client/models/api_response.py +61 -0
  12. heimdallpower_api_client-3.9.2/heimdall_api_client/assets_api_client/models/assets.py +75 -0
  13. heimdallpower_api_client-3.9.2/heimdall_api_client/assets_api_client/models/assets_v1_get_assets_response_200.py +67 -0
  14. heimdallpower_api_client-3.9.2/heimdall_api_client/assets_api_client/models/assets_v1_get_assets_x_region.py +9 -0
  15. heimdallpower_api_client-3.9.2/heimdall_api_client/assets_api_client/models/facility.py +161 -0
  16. heimdallpower_api_client-3.9.2/heimdall_api_client/assets_api_client/models/facility_component.py +70 -0
  17. heimdallpower_api_client-3.9.2/heimdall_api_client/assets_api_client/models/grid_owner.py +83 -0
  18. heimdallpower_api_client-3.9.2/heimdall_api_client/assets_api_client/models/line_type_0.py +101 -0
  19. heimdallpower_api_client-3.9.2/heimdall_api_client/assets_api_client/models/problem_details.py +97 -0
  20. heimdallpower_api_client-3.9.2/heimdall_api_client/assets_api_client/models/span.py +126 -0
  21. heimdallpower_api_client-3.9.2/heimdall_api_client/assets_api_client/models/span_phase.py +84 -0
  22. heimdallpower_api_client-3.9.2/heimdall_api_client/assets_api_client/py.typed +1 -0
  23. heimdallpower_api_client-3.9.2/heimdall_api_client/assets_api_client/types.py +54 -0
  24. heimdallpower_api_client-3.9.2/heimdall_api_client/auth.py +114 -0
  25. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring.py +133 -0
  26. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/__init__.py +8 -0
  27. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/api/__init__.py +1 -0
  28. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/api/facility/__init__.py +1 -0
  29. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/api/facility/capacity_monitoring_v1_facilities_get_circuit_ratings.py +398 -0
  30. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/api/facility/capacity_monitoring_v1_facilities_get_latest_circuit_rating.py +377 -0
  31. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/api/facility/capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts.py +387 -0
  32. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/api/line/__init__.py +1 -0
  33. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_heimdall_aars.py +386 -0
  34. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_heimdall_dlrs.py +378 -0
  35. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_latest_heimdall_aar.py +341 -0
  36. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts.py +341 -0
  37. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_latest_heimdall_dlr.py +337 -0
  38. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/api/line/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts.py +341 -0
  39. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/client.py +268 -0
  40. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/errors.py +16 -0
  41. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/__init__.py +111 -0
  42. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/api_response.py +61 -0
  43. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_circuit_ratings_response_200.py +67 -0
  44. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_circuit_ratings_x_region.py +9 -0
  45. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts_response_200.py +67 -0
  46. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_latest_circuit_rating_forecasts_x_region.py +9 -0
  47. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_latest_circuit_rating_response_200.py +67 -0
  48. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_facilities_get_latest_circuit_rating_x_region.py +9 -0
  49. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_heimdall_aars_response_200.py +67 -0
  50. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_heimdall_aars_x_region.py +9 -0
  51. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_heimdall_dlrs_response_200.py +67 -0
  52. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_heimdall_dlrs_x_region.py +9 -0
  53. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts_response_200.py +67 -0
  54. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_aar_forecasts_x_region.py +9 -0
  55. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_aar_response_200.py +67 -0
  56. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_aar_x_region.py +9 -0
  57. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts_response_200.py +67 -0
  58. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_forecasts_x_region.py +9 -0
  59. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_response_200.py +67 -0
  60. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/capacity_monitoring_v1_lines_get_latest_heimdall_dlr_x_region.py +9 -0
  61. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/circuit_rating.py +120 -0
  62. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/circuit_rating_forecasts.py +107 -0
  63. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/circuit_ratings.py +95 -0
  64. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_aar.py +76 -0
  65. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_aar_forecasts.py +107 -0
  66. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_aars.py +96 -0
  67. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_dlr.py +95 -0
  68. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_dlr_forecasts.py +107 -0
  69. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/heimdall_dlrs.py +96 -0
  70. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/latest_circuit_rating.py +87 -0
  71. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/latest_heimdall_aar.py +87 -0
  72. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/latest_heimdall_dlr.py +87 -0
  73. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/predicted_circuit_rating_forecast.py +109 -0
  74. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/predicted_forecast.py +109 -0
  75. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/probabilistic_circuit_rating_ampacity.py +101 -0
  76. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/probabilistic_line_ampacity.py +76 -0
  77. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/problem_details.py +97 -0
  78. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/models/quantity.py +9 -0
  79. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/py.typed +1 -0
  80. heimdallpower_api_client-3.9.2/heimdall_api_client/capacity_monitoring_api_client/types.py +54 -0
  81. heimdallpower_api_client-3.9.2/heimdall_api_client/client.py +344 -0
  82. heimdallpower_api_client-3.9.2/heimdall_api_client/errors.py +27 -0
  83. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights.py +123 -0
  84. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/__init__.py +8 -0
  85. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/api/__init__.py +1 -0
  86. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/api/line/__init__.py +1 -0
  87. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_apparent_power.py +283 -0
  88. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_conductor_temperatures.py +310 -0
  89. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_currents.py +277 -0
  90. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_icing.py +353 -0
  91. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_icing_forecast.py +310 -0
  92. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_apparent_power.py +244 -0
  93. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_conductor_temperature.py +269 -0
  94. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_current.py +233 -0
  95. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_icing.py +343 -0
  96. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_latest_sag_and_clearance.py +356 -0
  97. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/api/line/grid_insights_v1_lines_get_sag_and_clearance.py +355 -0
  98. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/client.py +268 -0
  99. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/errors.py +16 -0
  100. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/__init__.py +161 -0
  101. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/api_response.py +61 -0
  102. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/conductor_temperature_values.py +95 -0
  103. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_apparent_power_response_200.py +67 -0
  104. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_apparent_power_x_region.py +9 -0
  105. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_conductor_temperatures_response_200.py +67 -0
  106. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_conductor_temperatures_x_region.py +9 -0
  107. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_currents_response_200.py +67 -0
  108. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_currents_x_region.py +9 -0
  109. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_icing_forecast_response_200.py +67 -0
  110. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_icing_forecast_x_region.py +9 -0
  111. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_icing_response_200.py +67 -0
  112. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_icing_x_region.py +9 -0
  113. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_latest_apparent_power_response_200.py +67 -0
  114. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_latest_apparent_power_x_region.py +9 -0
  115. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_latest_conductor_temperature_response_200.py +67 -0
  116. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_latest_conductor_temperature_x_region.py +9 -0
  117. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_latest_current_response_200.py +67 -0
  118. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_latest_current_x_region.py +9 -0
  119. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_latest_icing_response_200.py +67 -0
  120. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_latest_icing_x_region.py +9 -0
  121. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_latest_sag_and_clearance_response_200.py +67 -0
  122. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_latest_sag_and_clearance_x_region.py +9 -0
  123. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_sag_and_clearance_response_200.py +67 -0
  124. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/grid_insights_v1_lines_get_sag_and_clearance_x_region.py +9 -0
  125. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/icing_forecast_data_point.py +77 -0
  126. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/icing_forecast_data_point_ice_weight.py +69 -0
  127. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/latest_conductor_temperature.py +83 -0
  128. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/latest_line_apparent_power.py +83 -0
  129. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/latest_line_current.py +83 -0
  130. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/latest_line_icing.py +83 -0
  131. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/latest_line_icing_icing.py +86 -0
  132. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/latest_line_sag_and_clearance.py +85 -0
  133. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/latest_line_sag_and_clearance_sag_and_clearance.py +137 -0
  134. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/latest_line_sag_and_clearance_sag_and_clearance_max_sag.py +89 -0
  135. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/latest_line_sag_and_clearance_sag_and_clearance_min_clearance_type_1.py +88 -0
  136. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/line_apparent_power.py +72 -0
  137. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/line_apparent_powers.py +92 -0
  138. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/line_conductor_temperatures.py +92 -0
  139. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/line_current.py +72 -0
  140. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/line_currents.py +92 -0
  141. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/line_icing_forecast.py +83 -0
  142. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/line_icing_forecast_icing.py +86 -0
  143. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/line_icings.py +84 -0
  144. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/line_icings_icing.py +87 -0
  145. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/line_sag_and_clearances.py +85 -0
  146. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/line_sag_and_clearances_sag_and_clearance.py +133 -0
  147. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/line_sag_and_clearances_sag_and_clearance_max_sag.py +89 -0
  148. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/line_sag_and_clearances_sag_and_clearance_min_clearance_type_1.py +88 -0
  149. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/max_icing.py +89 -0
  150. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/max_icing_forecast.py +68 -0
  151. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/max_icing_forecast_ice_weight.py +88 -0
  152. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/max_icing_ice_weight.py +88 -0
  153. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/max_icing_tension.py +88 -0
  154. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/max_icing_tension_percentage_of_break_strength.py +88 -0
  155. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/measurement_result.py +70 -0
  156. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/problem_details.py +97 -0
  157. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/span_icing.py +84 -0
  158. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/span_icing_forecast.py +85 -0
  159. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/span_phase_icing.py +113 -0
  160. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/span_phase_icing_forecast.py +85 -0
  161. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/span_phase_icing_ice_weight.py +69 -0
  162. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/span_phase_icing_tension.py +69 -0
  163. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/span_phase_icing_tension_percentage_of_break_strength.py +69 -0
  164. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/span_phase_measurement_result.py +88 -0
  165. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/span_phase_sag_and_clearance.py +123 -0
  166. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/span_phase_sag_and_clearance_clearance_type_1.py +69 -0
  167. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/span_phase_sag_and_clearance_sag.py +69 -0
  168. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/span_sag_and_clearance.py +84 -0
  169. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/models/unit_system.py +9 -0
  170. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/py.typed +1 -0
  171. heimdallpower_api_client-3.9.2/heimdall_api_client/grid_insights_api_client/types.py +54 -0
  172. heimdallpower_api_client-3.9.2/heimdall_api_client/py.typed +0 -0
  173. heimdallpower_api_client-3.9.2/pyproject.toml +50 -0
@@ -0,0 +1,18 @@
1
+ Metadata-Version: 2.4
2
+ Name: heimdallpower-api-client
3
+ Version: 3.9.2
4
+ Summary: Python SDK for interacting with the Heimdall Power External API
5
+ Author: Heimdall Power
6
+ Author-email: software-developers@heimdallpower.com
7
+ Requires-Python: >=3.11
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Classifier: Programming Language :: Python :: 3.13
12
+ Classifier: Programming Language :: Python :: 3.14
13
+ Requires-Dist: PyJWT (>=2.13.0,<3.0)
14
+ Requires-Dist: attrs (>=25.3.0,<26.0.0)
15
+ Requires-Dist: httpx (>=0.24.1,<1.0)
16
+ Requires-Dist: pydantic (>=2.13.4,<3.0)
17
+ Requires-Dist: python-dateutil (>=2.9.0.post0,<3.0.0)
18
+ Requires-Dist: requests (>=2.34.2,<3.0.0)
@@ -0,0 +1,4 @@
1
+ from .client import HeimdallApiClient
2
+ from .errors import HeimdallApiError
3
+
4
+ __all__ = ["HeimdallApiClient", "HeimdallApiError"]
@@ -0,0 +1,17 @@
1
+ from heimdall_api_client.assets_api_client.api.assets import assets_v1_get_assets
2
+ from heimdall_api_client.assets_api_client.client import AuthenticatedClient
3
+ from heimdall_api_client.assets_api_client.models.assets_v1_get_assets_response_200 import (
4
+ AssetsV1GetAssetsResponse200,
5
+ )
6
+ from heimdall_api_client.errors import HeimdallApiError, body_preview
7
+
8
+
9
+ def get_assets(client: AuthenticatedClient, x_region: str) -> AssetsV1GetAssetsResponse200:
10
+ response = assets_v1_get_assets.sync_detailed(client=client, x_region=x_region)
11
+ if response.status_code != 200:
12
+ status = int(response.status_code)
13
+ raise HeimdallApiError(
14
+ f"Error fetching assets: {status} {response.status_code.phrase} - {body_preview(response.content)}",
15
+ status_code=status,
16
+ )
17
+ return response.parsed
@@ -0,0 +1,8 @@
1
+ """A client library for accessing Assets API"""
2
+
3
+ from .client import AuthenticatedClient, Client
4
+
5
+ __all__ = (
6
+ "AuthenticatedClient",
7
+ "Client",
8
+ )
@@ -0,0 +1 @@
1
+ """Contains methods for accessing the API"""
@@ -0,0 +1 @@
1
+ """Contains endpoint functions for accessing the API"""
@@ -0,0 +1,190 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, cast
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.assets_v1_get_assets_response_200 import AssetsV1GetAssetsResponse200
9
+ from ...models.assets_v1_get_assets_x_region import AssetsV1GetAssetsXRegion
10
+ from ...models.problem_details import ProblemDetails
11
+ from ...types import Response, Unset
12
+
13
+
14
+ def _get_kwargs(
15
+ *,
16
+ x_region: AssetsV1GetAssetsXRegion | Unset = AssetsV1GetAssetsXRegion.EU,
17
+ ) -> dict[str, Any]:
18
+ headers: dict[str, Any] = {}
19
+ if not isinstance(x_region, Unset):
20
+ headers["x-region"] = str(x_region)
21
+
22
+ _kwargs: dict[str, Any] = {
23
+ "method": "get",
24
+ "url": "/assets/v1/assets",
25
+ }
26
+
27
+ _kwargs["headers"] = headers
28
+ return _kwargs
29
+
30
+
31
+ def _parse_response(
32
+ *, client: AuthenticatedClient | Client, response: httpx.Response
33
+ ) -> Any | AssetsV1GetAssetsResponse200 | ProblemDetails | None:
34
+ if response.status_code == 200:
35
+ response_200 = AssetsV1GetAssetsResponse200.from_dict(response.json())
36
+
37
+ return response_200
38
+
39
+ if response.status_code == 400:
40
+ response_400 = ProblemDetails.from_dict(response.json())
41
+
42
+ return response_400
43
+
44
+ if response.status_code == 401:
45
+ response_401 = cast(Any, None)
46
+ return response_401
47
+
48
+ if response.status_code == 403:
49
+ response_403 = ProblemDetails.from_dict(response.json())
50
+
51
+ return response_403
52
+
53
+ if response.status_code == 500:
54
+ response_500 = ProblemDetails.from_dict(response.json())
55
+
56
+ return response_500
57
+
58
+ if client.raise_on_unexpected_status:
59
+ raise errors.UnexpectedStatus(response.status_code, response.content)
60
+ else:
61
+ return None
62
+
63
+
64
+ def _build_response(
65
+ *, client: AuthenticatedClient | Client, response: httpx.Response
66
+ ) -> Response[Any | AssetsV1GetAssetsResponse200 | ProblemDetails]:
67
+ return Response(
68
+ status_code=HTTPStatus(response.status_code),
69
+ content=response.content,
70
+ headers=response.headers,
71
+ parsed=_parse_response(client=client, response=response),
72
+ )
73
+
74
+
75
+ def sync_detailed(
76
+ *,
77
+ client: AuthenticatedClient | Client,
78
+ x_region: AssetsV1GetAssetsXRegion | Unset = AssetsV1GetAssetsXRegion.EU,
79
+ ) -> Response[Any | AssetsV1GetAssetsResponse200 | ProblemDetails]:
80
+ """Get assets
81
+
82
+ This endpoint gets all assets you have access to, structured in the hierarchy described in the
83
+ introduction.
84
+
85
+ Args:
86
+ x_region (AssetsV1GetAssetsXRegion | Unset): Default: AssetsV1GetAssetsXRegion.EU.
87
+
88
+ Raises:
89
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
90
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
91
+
92
+ Returns:
93
+ Response[Any | AssetsV1GetAssetsResponse200 | ProblemDetails]
94
+ """
95
+
96
+ kwargs = _get_kwargs(
97
+ x_region=x_region,
98
+ )
99
+
100
+ response = client.get_httpx_client().request(
101
+ **kwargs,
102
+ )
103
+
104
+ return _build_response(client=client, response=response)
105
+
106
+
107
+ def sync(
108
+ *,
109
+ client: AuthenticatedClient | Client,
110
+ x_region: AssetsV1GetAssetsXRegion | Unset = AssetsV1GetAssetsXRegion.EU,
111
+ ) -> Any | AssetsV1GetAssetsResponse200 | ProblemDetails | None:
112
+ """Get assets
113
+
114
+ This endpoint gets all assets you have access to, structured in the hierarchy described in the
115
+ introduction.
116
+
117
+ Args:
118
+ x_region (AssetsV1GetAssetsXRegion | Unset): Default: AssetsV1GetAssetsXRegion.EU.
119
+
120
+ Raises:
121
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
122
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
123
+
124
+ Returns:
125
+ Any | AssetsV1GetAssetsResponse200 | ProblemDetails
126
+ """
127
+
128
+ return sync_detailed(
129
+ client=client,
130
+ x_region=x_region,
131
+ ).parsed
132
+
133
+
134
+ async def asyncio_detailed(
135
+ *,
136
+ client: AuthenticatedClient | Client,
137
+ x_region: AssetsV1GetAssetsXRegion | Unset = AssetsV1GetAssetsXRegion.EU,
138
+ ) -> Response[Any | AssetsV1GetAssetsResponse200 | ProblemDetails]:
139
+ """Get assets
140
+
141
+ This endpoint gets all assets you have access to, structured in the hierarchy described in the
142
+ introduction.
143
+
144
+ Args:
145
+ x_region (AssetsV1GetAssetsXRegion | Unset): Default: AssetsV1GetAssetsXRegion.EU.
146
+
147
+ Raises:
148
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
149
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
150
+
151
+ Returns:
152
+ Response[Any | AssetsV1GetAssetsResponse200 | ProblemDetails]
153
+ """
154
+
155
+ kwargs = _get_kwargs(
156
+ x_region=x_region,
157
+ )
158
+
159
+ response = await client.get_async_httpx_client().request(**kwargs)
160
+
161
+ return _build_response(client=client, response=response)
162
+
163
+
164
+ async def asyncio(
165
+ *,
166
+ client: AuthenticatedClient | Client,
167
+ x_region: AssetsV1GetAssetsXRegion | Unset = AssetsV1GetAssetsXRegion.EU,
168
+ ) -> Any | AssetsV1GetAssetsResponse200 | ProblemDetails | None:
169
+ """Get assets
170
+
171
+ This endpoint gets all assets you have access to, structured in the hierarchy described in the
172
+ introduction.
173
+
174
+ Args:
175
+ x_region (AssetsV1GetAssetsXRegion | Unset): Default: AssetsV1GetAssetsXRegion.EU.
176
+
177
+ Raises:
178
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
179
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
180
+
181
+ Returns:
182
+ Any | AssetsV1GetAssetsResponse200 | ProblemDetails
183
+ """
184
+
185
+ return (
186
+ await asyncio_detailed(
187
+ client=client,
188
+ x_region=x_region,
189
+ )
190
+ ).parsed
@@ -0,0 +1,268 @@
1
+ import ssl
2
+ from typing import Any
3
+
4
+ import httpx
5
+ from attrs import define, evolve, field
6
+
7
+
8
+ @define
9
+ class Client:
10
+ """A class for keeping track of data related to the API
11
+
12
+ The following are accepted as keyword arguments and will be used to construct httpx Clients internally:
13
+
14
+ ``base_url``: The base URL for the API, all requests are made to a relative path to this URL
15
+
16
+ ``cookies``: A dictionary of cookies to be sent with every request
17
+
18
+ ``headers``: A dictionary of headers to be sent with every request
19
+
20
+ ``timeout``: The maximum amount of a time a request can take. API functions will raise
21
+ httpx.TimeoutException if this is exceeded.
22
+
23
+ ``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production,
24
+ but can be set to False for testing purposes.
25
+
26
+ ``follow_redirects``: Whether or not to follow redirects. Default value is False.
27
+
28
+ ``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor.
29
+
30
+
31
+ Attributes:
32
+ raise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a
33
+ status code that was not documented in the source OpenAPI document. Can also be provided as a keyword
34
+ argument to the constructor.
35
+ """
36
+
37
+ raise_on_unexpected_status: bool = field(default=False, kw_only=True)
38
+ _base_url: str = field(alias="base_url")
39
+ _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies")
40
+ _headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers")
41
+ _timeout: httpx.Timeout | None = field(default=None, kw_only=True, alias="timeout")
42
+ _verify_ssl: str | bool | ssl.SSLContext = field(default=True, kw_only=True, alias="verify_ssl")
43
+ _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects")
44
+ _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args")
45
+ _client: httpx.Client | None = field(default=None, init=False)
46
+ _async_client: httpx.AsyncClient | None = field(default=None, init=False)
47
+
48
+ def with_headers(self, headers: dict[str, str]) -> "Client":
49
+ """Get a new client matching this one with additional headers"""
50
+ if self._client is not None:
51
+ self._client.headers.update(headers)
52
+ if self._async_client is not None:
53
+ self._async_client.headers.update(headers)
54
+ return evolve(self, headers={**self._headers, **headers})
55
+
56
+ def with_cookies(self, cookies: dict[str, str]) -> "Client":
57
+ """Get a new client matching this one with additional cookies"""
58
+ if self._client is not None:
59
+ self._client.cookies.update(cookies)
60
+ if self._async_client is not None:
61
+ self._async_client.cookies.update(cookies)
62
+ return evolve(self, cookies={**self._cookies, **cookies})
63
+
64
+ def with_timeout(self, timeout: httpx.Timeout) -> "Client":
65
+ """Get a new client matching this one with a new timeout configuration"""
66
+ if self._client is not None:
67
+ self._client.timeout = timeout
68
+ if self._async_client is not None:
69
+ self._async_client.timeout = timeout
70
+ return evolve(self, timeout=timeout)
71
+
72
+ def set_httpx_client(self, client: httpx.Client) -> "Client":
73
+ """Manually set the underlying httpx.Client
74
+
75
+ **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.
76
+ """
77
+ self._client = client
78
+ return self
79
+
80
+ def get_httpx_client(self) -> httpx.Client:
81
+ """Get the underlying httpx.Client, constructing a new one if not previously set"""
82
+ if self._client is None:
83
+ self._client = httpx.Client(
84
+ base_url=self._base_url,
85
+ cookies=self._cookies,
86
+ headers=self._headers,
87
+ timeout=self._timeout,
88
+ verify=self._verify_ssl,
89
+ follow_redirects=self._follow_redirects,
90
+ **self._httpx_args,
91
+ )
92
+ return self._client
93
+
94
+ def __enter__(self) -> "Client":
95
+ """Enter a context manager for self.client—you cannot enter twice (see httpx docs)"""
96
+ self.get_httpx_client().__enter__()
97
+ return self
98
+
99
+ def __exit__(self, *args: Any, **kwargs: Any) -> None:
100
+ """Exit a context manager for internal httpx.Client (see httpx docs)"""
101
+ self.get_httpx_client().__exit__(*args, **kwargs)
102
+
103
+ def set_async_httpx_client(self, async_client: httpx.AsyncClient) -> "Client":
104
+ """Manually set the underlying httpx.AsyncClient
105
+
106
+ **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.
107
+ """
108
+ self._async_client = async_client
109
+ return self
110
+
111
+ def get_async_httpx_client(self) -> httpx.AsyncClient:
112
+ """Get the underlying httpx.AsyncClient, constructing a new one if not previously set"""
113
+ if self._async_client is None:
114
+ self._async_client = httpx.AsyncClient(
115
+ base_url=self._base_url,
116
+ cookies=self._cookies,
117
+ headers=self._headers,
118
+ timeout=self._timeout,
119
+ verify=self._verify_ssl,
120
+ follow_redirects=self._follow_redirects,
121
+ **self._httpx_args,
122
+ )
123
+ return self._async_client
124
+
125
+ async def __aenter__(self) -> "Client":
126
+ """Enter a context manager for underlying httpx.AsyncClient—you cannot enter twice (see httpx docs)"""
127
+ await self.get_async_httpx_client().__aenter__()
128
+ return self
129
+
130
+ async def __aexit__(self, *args: Any, **kwargs: Any) -> None:
131
+ """Exit a context manager for underlying httpx.AsyncClient (see httpx docs)"""
132
+ await self.get_async_httpx_client().__aexit__(*args, **kwargs)
133
+
134
+
135
+ @define
136
+ class AuthenticatedClient:
137
+ """A Client which has been authenticated for use on secured endpoints
138
+
139
+ The following are accepted as keyword arguments and will be used to construct httpx Clients internally:
140
+
141
+ ``base_url``: The base URL for the API, all requests are made to a relative path to this URL
142
+
143
+ ``cookies``: A dictionary of cookies to be sent with every request
144
+
145
+ ``headers``: A dictionary of headers to be sent with every request
146
+
147
+ ``timeout``: The maximum amount of a time a request can take. API functions will raise
148
+ httpx.TimeoutException if this is exceeded.
149
+
150
+ ``verify_ssl``: Whether or not to verify the SSL certificate of the API server. This should be True in production,
151
+ but can be set to False for testing purposes.
152
+
153
+ ``follow_redirects``: Whether or not to follow redirects. Default value is False.
154
+
155
+ ``httpx_args``: A dictionary of additional arguments to be passed to the ``httpx.Client`` and ``httpx.AsyncClient`` constructor.
156
+
157
+
158
+ Attributes:
159
+ raise_on_unexpected_status: Whether or not to raise an errors.UnexpectedStatus if the API returns a
160
+ status code that was not documented in the source OpenAPI document. Can also be provided as a keyword
161
+ argument to the constructor.
162
+ token: The token to use for authentication
163
+ prefix: The prefix to use for the Authorization header
164
+ auth_header_name: The name of the Authorization header
165
+ """
166
+
167
+ raise_on_unexpected_status: bool = field(default=False, kw_only=True)
168
+ _base_url: str = field(alias="base_url")
169
+ _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies")
170
+ _headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers")
171
+ _timeout: httpx.Timeout | None = field(default=None, kw_only=True, alias="timeout")
172
+ _verify_ssl: str | bool | ssl.SSLContext = field(default=True, kw_only=True, alias="verify_ssl")
173
+ _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects")
174
+ _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args")
175
+ _client: httpx.Client | None = field(default=None, init=False)
176
+ _async_client: httpx.AsyncClient | None = field(default=None, init=False)
177
+
178
+ token: str
179
+ prefix: str = "Bearer"
180
+ auth_header_name: str = "Authorization"
181
+
182
+ def with_headers(self, headers: dict[str, str]) -> "AuthenticatedClient":
183
+ """Get a new client matching this one with additional headers"""
184
+ if self._client is not None:
185
+ self._client.headers.update(headers)
186
+ if self._async_client is not None:
187
+ self._async_client.headers.update(headers)
188
+ return evolve(self, headers={**self._headers, **headers})
189
+
190
+ def with_cookies(self, cookies: dict[str, str]) -> "AuthenticatedClient":
191
+ """Get a new client matching this one with additional cookies"""
192
+ if self._client is not None:
193
+ self._client.cookies.update(cookies)
194
+ if self._async_client is not None:
195
+ self._async_client.cookies.update(cookies)
196
+ return evolve(self, cookies={**self._cookies, **cookies})
197
+
198
+ def with_timeout(self, timeout: httpx.Timeout) -> "AuthenticatedClient":
199
+ """Get a new client matching this one with a new timeout configuration"""
200
+ if self._client is not None:
201
+ self._client.timeout = timeout
202
+ if self._async_client is not None:
203
+ self._async_client.timeout = timeout
204
+ return evolve(self, timeout=timeout)
205
+
206
+ def set_httpx_client(self, client: httpx.Client) -> "AuthenticatedClient":
207
+ """Manually set the underlying httpx.Client
208
+
209
+ **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.
210
+ """
211
+ self._client = client
212
+ return self
213
+
214
+ def get_httpx_client(self) -> httpx.Client:
215
+ """Get the underlying httpx.Client, constructing a new one if not previously set"""
216
+ if self._client is None:
217
+ self._headers[self.auth_header_name] = f"{self.prefix} {self.token}" if self.prefix else self.token
218
+ self._client = httpx.Client(
219
+ base_url=self._base_url,
220
+ cookies=self._cookies,
221
+ headers=self._headers,
222
+ timeout=self._timeout,
223
+ verify=self._verify_ssl,
224
+ follow_redirects=self._follow_redirects,
225
+ **self._httpx_args,
226
+ )
227
+ return self._client
228
+
229
+ def __enter__(self) -> "AuthenticatedClient":
230
+ """Enter a context manager for self.client—you cannot enter twice (see httpx docs)"""
231
+ self.get_httpx_client().__enter__()
232
+ return self
233
+
234
+ def __exit__(self, *args: Any, **kwargs: Any) -> None:
235
+ """Exit a context manager for internal httpx.Client (see httpx docs)"""
236
+ self.get_httpx_client().__exit__(*args, **kwargs)
237
+
238
+ def set_async_httpx_client(self, async_client: httpx.AsyncClient) -> "AuthenticatedClient":
239
+ """Manually set the underlying httpx.AsyncClient
240
+
241
+ **NOTE**: This will override any other settings on the client, including cookies, headers, and timeout.
242
+ """
243
+ self._async_client = async_client
244
+ return self
245
+
246
+ def get_async_httpx_client(self) -> httpx.AsyncClient:
247
+ """Get the underlying httpx.AsyncClient, constructing a new one if not previously set"""
248
+ if self._async_client is None:
249
+ self._headers[self.auth_header_name] = f"{self.prefix} {self.token}" if self.prefix else self.token
250
+ self._async_client = httpx.AsyncClient(
251
+ base_url=self._base_url,
252
+ cookies=self._cookies,
253
+ headers=self._headers,
254
+ timeout=self._timeout,
255
+ verify=self._verify_ssl,
256
+ follow_redirects=self._follow_redirects,
257
+ **self._httpx_args,
258
+ )
259
+ return self._async_client
260
+
261
+ async def __aenter__(self) -> "AuthenticatedClient":
262
+ """Enter a context manager for underlying httpx.AsyncClient—you cannot enter twice (see httpx docs)"""
263
+ await self.get_async_httpx_client().__aenter__()
264
+ return self
265
+
266
+ async def __aexit__(self, *args: Any, **kwargs: Any) -> None:
267
+ """Exit a context manager for underlying httpx.AsyncClient (see httpx docs)"""
268
+ await self.get_async_httpx_client().__aexit__(*args, **kwargs)
@@ -0,0 +1,16 @@
1
+ """Contains shared errors types that can be raised from API functions"""
2
+
3
+
4
+ class UnexpectedStatus(Exception):
5
+ """Raised by api functions when the response status an undocumented status and Client.raise_on_unexpected_status is True"""
6
+
7
+ def __init__(self, status_code: int, content: bytes):
8
+ self.status_code = status_code
9
+ self.content = content
10
+
11
+ super().__init__(
12
+ f"Unexpected status code: {status_code}\n\nResponse content:\n{content.decode(errors='ignore')}"
13
+ )
14
+
15
+
16
+ __all__ = ["UnexpectedStatus"]
@@ -0,0 +1,27 @@
1
+ """Contains all the data models used in inputs/outputs"""
2
+
3
+ from .api_response import ApiResponse
4
+ from .assets import Assets
5
+ from .assets_v1_get_assets_response_200 import AssetsV1GetAssetsResponse200
6
+ from .assets_v1_get_assets_x_region import AssetsV1GetAssetsXRegion
7
+ from .facility import Facility
8
+ from .facility_component import FacilityComponent
9
+ from .grid_owner import GridOwner
10
+ from .line_type_0 import LineType0
11
+ from .problem_details import ProblemDetails
12
+ from .span import Span
13
+ from .span_phase import SpanPhase
14
+
15
+ __all__ = (
16
+ "ApiResponse",
17
+ "Assets",
18
+ "AssetsV1GetAssetsResponse200",
19
+ "AssetsV1GetAssetsXRegion",
20
+ "Facility",
21
+ "FacilityComponent",
22
+ "GridOwner",
23
+ "LineType0",
24
+ "ProblemDetails",
25
+ "Span",
26
+ "SpanPhase",
27
+ )
@@ -0,0 +1,61 @@
1
+ from __future__ import annotations
2
+
3
+ from collections.abc import Mapping
4
+ from typing import Any, TypeVar
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+
9
+ T = TypeVar("T", bound="ApiResponse")
10
+
11
+
12
+ @_attrs_define
13
+ class ApiResponse:
14
+ """
15
+ Attributes:
16
+ data (Any):
17
+ """
18
+
19
+ data: Any
20
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
21
+
22
+ def to_dict(self) -> dict[str, Any]:
23
+ data = self.data
24
+
25
+ field_dict: dict[str, Any] = {}
26
+ field_dict.update(self.additional_properties)
27
+ field_dict.update(
28
+ {
29
+ "data": data,
30
+ }
31
+ )
32
+
33
+ return field_dict
34
+
35
+ @classmethod
36
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
37
+ d = dict(src_dict)
38
+ data = d.pop("data")
39
+
40
+ api_response = cls(
41
+ data=data,
42
+ )
43
+
44
+ api_response.additional_properties = d
45
+ return api_response
46
+
47
+ @property
48
+ def additional_keys(self) -> list[str]:
49
+ return list(self.additional_properties.keys())
50
+
51
+ def __getitem__(self, key: str) -> Any:
52
+ return self.additional_properties[key]
53
+
54
+ def __setitem__(self, key: str, value: Any) -> None:
55
+ self.additional_properties[key] = value
56
+
57
+ def __delitem__(self, key: str) -> None:
58
+ del self.additional_properties[key]
59
+
60
+ def __contains__(self, key: str) -> bool:
61
+ return key in self.additional_properties