hiddenlayer-sdk 2.0.10__py3-none-any.whl → 3.0.1__py3-none-any.whl

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 (204) hide show
  1. hiddenlayer/__init__.py +109 -114
  2. hiddenlayer/_base_client.py +1995 -0
  3. hiddenlayer/_client.py +761 -0
  4. hiddenlayer/_compat.py +219 -0
  5. hiddenlayer/_constants.py +14 -0
  6. hiddenlayer/_exceptions.py +108 -0
  7. hiddenlayer/_files.py +123 -0
  8. hiddenlayer/_models.py +835 -0
  9. hiddenlayer/_oauth2.py +118 -0
  10. hiddenlayer/_qs.py +150 -0
  11. hiddenlayer/_resource.py +43 -0
  12. hiddenlayer/_response.py +832 -0
  13. hiddenlayer/_streaming.py +333 -0
  14. hiddenlayer/_types.py +260 -0
  15. hiddenlayer/_utils/__init__.py +64 -0
  16. hiddenlayer/_utils/_compat.py +45 -0
  17. hiddenlayer/_utils/_datetime_parse.py +136 -0
  18. hiddenlayer/_utils/_logs.py +25 -0
  19. hiddenlayer/_utils/_proxy.py +65 -0
  20. hiddenlayer/_utils/_reflection.py +42 -0
  21. hiddenlayer/_utils/_resources_proxy.py +24 -0
  22. hiddenlayer/_utils/_streams.py +12 -0
  23. hiddenlayer/_utils/_sync.py +86 -0
  24. hiddenlayer/_utils/_transform.py +457 -0
  25. hiddenlayer/_utils/_typing.py +156 -0
  26. hiddenlayer/_utils/_utils.py +421 -0
  27. hiddenlayer/_version.py +4 -0
  28. hiddenlayer/lib/.keep +4 -0
  29. hiddenlayer/lib/__init__.py +6 -0
  30. hiddenlayer/lib/community_scan.py +174 -0
  31. hiddenlayer/lib/model_scan.py +752 -0
  32. hiddenlayer/lib/scan_utils.py +142 -0
  33. hiddenlayer/pagination.py +127 -0
  34. hiddenlayer/resources/__init__.py +75 -0
  35. hiddenlayer/resources/interactions.py +205 -0
  36. hiddenlayer/resources/models/__init__.py +33 -0
  37. hiddenlayer/resources/models/cards.py +259 -0
  38. hiddenlayer/resources/models/models.py +284 -0
  39. hiddenlayer/resources/prompt_analyzer.py +207 -0
  40. hiddenlayer/resources/scans/__init__.py +61 -0
  41. hiddenlayer/resources/scans/jobs.py +499 -0
  42. hiddenlayer/resources/scans/results.py +169 -0
  43. hiddenlayer/resources/scans/scans.py +166 -0
  44. hiddenlayer/resources/scans/upload/__init__.py +33 -0
  45. hiddenlayer/resources/scans/upload/file.py +279 -0
  46. hiddenlayer/resources/scans/upload/upload.py +340 -0
  47. hiddenlayer/resources/sensors.py +575 -0
  48. hiddenlayer/types/__init__.py +16 -0
  49. hiddenlayer/types/interaction_analyze_params.py +62 -0
  50. hiddenlayer/types/interaction_analyze_response.py +199 -0
  51. hiddenlayer/types/model_retrieve_response.py +50 -0
  52. hiddenlayer/types/models/__init__.py +6 -0
  53. hiddenlayer/types/models/card_list_params.py +65 -0
  54. hiddenlayer/types/models/card_list_response.py +50 -0
  55. hiddenlayer/types/prompt_analyzer_create_params.py +23 -0
  56. hiddenlayer/types/prompt_analyzer_create_response.py +381 -0
  57. hiddenlayer/types/scans/__init__.py +14 -0
  58. hiddenlayer/types/scans/job_list_params.py +75 -0
  59. hiddenlayer/types/scans/job_list_response.py +22 -0
  60. hiddenlayer/types/scans/job_request_params.py +49 -0
  61. hiddenlayer/types/scans/job_retrieve_params.py +16 -0
  62. hiddenlayer/types/scans/result_sarif_response.py +7 -0
  63. hiddenlayer/types/scans/scan_job.py +46 -0
  64. hiddenlayer/types/scans/scan_report.py +367 -0
  65. hiddenlayer/types/scans/upload/__init__.py +6 -0
  66. hiddenlayer/types/scans/upload/file_add_response.py +24 -0
  67. hiddenlayer/types/scans/upload/file_complete_response.py +12 -0
  68. hiddenlayer/types/scans/upload_complete_all_response.py +12 -0
  69. hiddenlayer/types/scans/upload_start_params.py +34 -0
  70. hiddenlayer/types/scans/upload_start_response.py +12 -0
  71. hiddenlayer/types/sensor_create_params.py +24 -0
  72. hiddenlayer/types/sensor_create_response.py +33 -0
  73. hiddenlayer/types/sensor_query_params.py +39 -0
  74. hiddenlayer/types/sensor_query_response.py +43 -0
  75. hiddenlayer/types/sensor_retrieve_response.py +33 -0
  76. hiddenlayer/types/sensor_update_params.py +20 -0
  77. hiddenlayer/types/sensor_update_response.py +9 -0
  78. hiddenlayer_sdk-3.0.1.dist-info/METADATA +521 -0
  79. hiddenlayer_sdk-3.0.1.dist-info/RECORD +82 -0
  80. {hiddenlayer_sdk-2.0.10.dist-info → hiddenlayer_sdk-3.0.1.dist-info}/WHEEL +1 -2
  81. {hiddenlayer_sdk-2.0.10.dist-info → hiddenlayer_sdk-3.0.1.dist-info}/licenses/LICENSE +1 -1
  82. hiddenlayer/sdk/constants.py +0 -26
  83. hiddenlayer/sdk/exceptions.py +0 -12
  84. hiddenlayer/sdk/models.py +0 -58
  85. hiddenlayer/sdk/rest/__init__.py +0 -135
  86. hiddenlayer/sdk/rest/api/__init__.py +0 -10
  87. hiddenlayer/sdk/rest/api/aidr_predictive_api.py +0 -308
  88. hiddenlayer/sdk/rest/api/health_api.py +0 -272
  89. hiddenlayer/sdk/rest/api/model_api.py +0 -559
  90. hiddenlayer/sdk/rest/api/model_supply_chain_api.py +0 -4063
  91. hiddenlayer/sdk/rest/api/readiness_api.py +0 -272
  92. hiddenlayer/sdk/rest/api/sensor_api.py +0 -1432
  93. hiddenlayer/sdk/rest/api_client.py +0 -770
  94. hiddenlayer/sdk/rest/api_response.py +0 -21
  95. hiddenlayer/sdk/rest/configuration.py +0 -445
  96. hiddenlayer/sdk/rest/exceptions.py +0 -199
  97. hiddenlayer/sdk/rest/models/__init__.py +0 -113
  98. hiddenlayer/sdk/rest/models/address.py +0 -110
  99. hiddenlayer/sdk/rest/models/artifact.py +0 -155
  100. hiddenlayer/sdk/rest/models/artifact_change.py +0 -108
  101. hiddenlayer/sdk/rest/models/artifact_content.py +0 -101
  102. hiddenlayer/sdk/rest/models/artifact_location.py +0 -109
  103. hiddenlayer/sdk/rest/models/attachment.py +0 -129
  104. hiddenlayer/sdk/rest/models/begin_multi_file_upload200_response.py +0 -87
  105. hiddenlayer/sdk/rest/models/begin_multipart_file_upload200_response.py +0 -97
  106. hiddenlayer/sdk/rest/models/begin_multipart_file_upload200_response_parts_inner.py +0 -94
  107. hiddenlayer/sdk/rest/models/code_flow.py +0 -113
  108. hiddenlayer/sdk/rest/models/configuration_override.py +0 -108
  109. hiddenlayer/sdk/rest/models/conversion.py +0 -114
  110. hiddenlayer/sdk/rest/models/create_sensor_request.py +0 -95
  111. hiddenlayer/sdk/rest/models/edge.py +0 -108
  112. hiddenlayer/sdk/rest/models/edge_traversal.py +0 -122
  113. hiddenlayer/sdk/rest/models/errors_inner.py +0 -91
  114. hiddenlayer/sdk/rest/models/exception.py +0 -113
  115. hiddenlayer/sdk/rest/models/external_properties.py +0 -273
  116. hiddenlayer/sdk/rest/models/external_property_file_reference.py +0 -102
  117. hiddenlayer/sdk/rest/models/external_property_file_references.py +0 -240
  118. hiddenlayer/sdk/rest/models/file_details_v3.py +0 -139
  119. hiddenlayer/sdk/rest/models/file_result_v3.py +0 -117
  120. hiddenlayer/sdk/rest/models/file_scan_report_v3.py +0 -132
  121. hiddenlayer/sdk/rest/models/file_scan_reports_v3.py +0 -95
  122. hiddenlayer/sdk/rest/models/fix.py +0 -113
  123. hiddenlayer/sdk/rest/models/get_condensed_model_scan_reports200_response.py +0 -102
  124. hiddenlayer/sdk/rest/models/graph.py +0 -123
  125. hiddenlayer/sdk/rest/models/graph_traversal.py +0 -97
  126. hiddenlayer/sdk/rest/models/inventory_v3.py +0 -101
  127. hiddenlayer/sdk/rest/models/invocation.py +0 -199
  128. hiddenlayer/sdk/rest/models/location.py +0 -146
  129. hiddenlayer/sdk/rest/models/location_inner.py +0 -138
  130. hiddenlayer/sdk/rest/models/location_relationship.py +0 -107
  131. hiddenlayer/sdk/rest/models/logical_location.py +0 -104
  132. hiddenlayer/sdk/rest/models/message.py +0 -92
  133. hiddenlayer/sdk/rest/models/mitre_atlas_inner.py +0 -110
  134. hiddenlayer/sdk/rest/models/model.py +0 -103
  135. hiddenlayer/sdk/rest/models/model_inventory_info.py +0 -103
  136. hiddenlayer/sdk/rest/models/model_version.py +0 -97
  137. hiddenlayer/sdk/rest/models/multi_file_upload_request_v3.py +0 -97
  138. hiddenlayer/sdk/rest/models/multiformat_message_string.py +0 -95
  139. hiddenlayer/sdk/rest/models/node.py +0 -122
  140. hiddenlayer/sdk/rest/models/notification.py +0 -157
  141. hiddenlayer/sdk/rest/models/notify_model_scan_completed200_response.py +0 -87
  142. hiddenlayer/sdk/rest/models/paged_response_with_total.py +0 -94
  143. hiddenlayer/sdk/rest/models/pagination_v3.py +0 -95
  144. hiddenlayer/sdk/rest/models/physical_location.py +0 -94
  145. hiddenlayer/sdk/rest/models/problem_details.py +0 -103
  146. hiddenlayer/sdk/rest/models/property_bag.py +0 -101
  147. hiddenlayer/sdk/rest/models/rectangle.py +0 -110
  148. hiddenlayer/sdk/rest/models/region.py +0 -127
  149. hiddenlayer/sdk/rest/models/replacement.py +0 -103
  150. hiddenlayer/sdk/rest/models/reporting_configuration.py +0 -113
  151. hiddenlayer/sdk/rest/models/reporting_descriptor.py +0 -162
  152. hiddenlayer/sdk/rest/models/reporting_descriptor_reference.py +0 -103
  153. hiddenlayer/sdk/rest/models/reporting_descriptor_relationship.py +0 -115
  154. hiddenlayer/sdk/rest/models/result.py +0 -312
  155. hiddenlayer/sdk/rest/models/result_provenance.py +0 -133
  156. hiddenlayer/sdk/rest/models/rule_details_inner.py +0 -102
  157. hiddenlayer/sdk/rest/models/run.py +0 -318
  158. hiddenlayer/sdk/rest/models/run_automation_details.py +0 -129
  159. hiddenlayer/sdk/rest/models/sarif210.py +0 -123
  160. hiddenlayer/sdk/rest/models/scan_create_request.py +0 -87
  161. hiddenlayer/sdk/rest/models/scan_detection_v3.py +0 -159
  162. hiddenlayer/sdk/rest/models/scan_detection_v31.py +0 -158
  163. hiddenlayer/sdk/rest/models/scan_header_v3.py +0 -129
  164. hiddenlayer/sdk/rest/models/scan_job.py +0 -115
  165. hiddenlayer/sdk/rest/models/scan_job_access.py +0 -97
  166. hiddenlayer/sdk/rest/models/scan_model_details_v3.py +0 -99
  167. hiddenlayer/sdk/rest/models/scan_model_details_v31.py +0 -97
  168. hiddenlayer/sdk/rest/models/scan_model_ids_v3.py +0 -89
  169. hiddenlayer/sdk/rest/models/scan_report_v3.py +0 -139
  170. hiddenlayer/sdk/rest/models/scan_results_map_v3.py +0 -105
  171. hiddenlayer/sdk/rest/models/scan_results_v3.py +0 -120
  172. hiddenlayer/sdk/rest/models/security_posture.py +0 -89
  173. hiddenlayer/sdk/rest/models/sensor.py +0 -100
  174. hiddenlayer/sdk/rest/models/sensor_query_response.py +0 -101
  175. hiddenlayer/sdk/rest/models/sensor_sor_model_card_query_response.py +0 -101
  176. hiddenlayer/sdk/rest/models/sensor_sor_model_card_response.py +0 -127
  177. hiddenlayer/sdk/rest/models/sensor_sor_query_filter.py +0 -108
  178. hiddenlayer/sdk/rest/models/sensor_sor_query_request.py +0 -109
  179. hiddenlayer/sdk/rest/models/special_locations.py +0 -97
  180. hiddenlayer/sdk/rest/models/stack.py +0 -113
  181. hiddenlayer/sdk/rest/models/stack_frame.py +0 -104
  182. hiddenlayer/sdk/rest/models/submission_response.py +0 -95
  183. hiddenlayer/sdk/rest/models/submission_v2.py +0 -109
  184. hiddenlayer/sdk/rest/models/suppression.py +0 -133
  185. hiddenlayer/sdk/rest/models/thread_flow.py +0 -144
  186. hiddenlayer/sdk/rest/models/thread_flow_location.py +0 -166
  187. hiddenlayer/sdk/rest/models/tool.py +0 -107
  188. hiddenlayer/sdk/rest/models/tool_component.py +0 -251
  189. hiddenlayer/sdk/rest/models/tool_component_reference.py +0 -108
  190. hiddenlayer/sdk/rest/models/translation_metadata.py +0 -110
  191. hiddenlayer/sdk/rest/models/validation_error_model.py +0 -99
  192. hiddenlayer/sdk/rest/models/version_control_details.py +0 -108
  193. hiddenlayer/sdk/rest/models/web_request.py +0 -112
  194. hiddenlayer/sdk/rest/models/web_response.py +0 -112
  195. hiddenlayer/sdk/rest/rest.py +0 -257
  196. hiddenlayer/sdk/services/__init__.py +0 -0
  197. hiddenlayer/sdk/services/aidr_predictive.py +0 -130
  198. hiddenlayer/sdk/services/model_scan.py +0 -505
  199. hiddenlayer/sdk/utils.py +0 -92
  200. hiddenlayer/sdk/version.py +0 -1
  201. hiddenlayer_sdk-2.0.10.dist-info/METADATA +0 -368
  202. hiddenlayer_sdk-2.0.10.dist-info/RECORD +0 -126
  203. hiddenlayer_sdk-2.0.10.dist-info/top_level.txt +0 -1
  204. /hiddenlayer/{sdk/__init__.py → py.typed} +0 -0
@@ -0,0 +1,521 @@
1
+ Metadata-Version: 2.3
2
+ Name: hiddenlayer-sdk
3
+ Version: 3.0.1
4
+ Summary: The official Python library for the hiddenlayer API
5
+ Project-URL: Homepage, https://github.com/hiddenlayerai/hiddenlayer-sdk-python
6
+ Project-URL: Repository, https://github.com/hiddenlayerai/hiddenlayer-sdk-python
7
+ Author-email: HiddenLayer <dev-feedback@hiddenlayer-sdk.com>
8
+ License: Apache-2.0
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Operating System :: MacOS
12
+ Classifier: Operating System :: Microsoft :: Windows
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Operating System :: POSIX
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Classifier: Typing :: Typed
24
+ Requires-Python: >=3.8
25
+ Requires-Dist: anyio<5,>=3.5.0
26
+ Requires-Dist: distro<2,>=1.7.0
27
+ Requires-Dist: httpx<1,>=0.23.0
28
+ Requires-Dist: pydantic<3,>=1.9.0
29
+ Requires-Dist: requests-auth>=8.0.0
30
+ Requires-Dist: requests>=2.32.4
31
+ Requires-Dist: sniffio
32
+ Requires-Dist: types-requests>=2.32.0.20241016
33
+ Requires-Dist: typing-extensions<5,>=4.10
34
+ Provides-Extra: aiohttp
35
+ Requires-Dist: aiohttp; extra == 'aiohttp'
36
+ Requires-Dist: httpx-aiohttp>=0.1.8; extra == 'aiohttp'
37
+ Description-Content-Type: text/markdown
38
+
39
+ # HiddenLayer Python API library
40
+
41
+ <!-- prettier-ignore -->
42
+ [![PyPI version](https://img.shields.io/pypi/v/hiddenlayer-sdk.svg?label=pypi%20(stable))](https://pypi.org/project/hiddenlayer-sdk/)
43
+
44
+ The HiddenLayer Python library provides convenient access to the HiddenLayer REST API from any Python 3.8+
45
+ application. The library includes type definitions for all request params and response fields,
46
+ and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
47
+
48
+ It is generated with [Stainless](https://www.stainless.com/).
49
+
50
+ ## Documentation
51
+
52
+ The REST API documentation can be found on [dev.hiddenlayer.ai](https://dev.hiddenlayer.ai). The full API of this library can be found in [api.md](https://github.com/hiddenlayerai/hiddenlayer-sdk-python/tree/main/api.md).
53
+
54
+ ## Installation
55
+
56
+ ```sh
57
+ # install from PyPI
58
+ pip install hiddenlayer-sdk
59
+ ```
60
+
61
+ ## Usage
62
+
63
+ The full API of this library can be found in [api.md](https://github.com/hiddenlayerai/hiddenlayer-sdk-python/tree/main/api.md).
64
+
65
+ ```python
66
+ from hiddenlayer import HiddenLayer
67
+
68
+ client = HiddenLayer(
69
+ # defaults to "prod-us".
70
+ environment="prod-eu",
71
+ )
72
+
73
+ response = client.interactions.analyze(
74
+ metadata={
75
+ "model": "REPLACE_ME",
76
+ "requester_id": "REPLACE_ME",
77
+ },
78
+ input={
79
+ "messages": [
80
+ {
81
+ "role": "user",
82
+ "content": "REPLACE_ME",
83
+ }
84
+ ]
85
+ },
86
+ )
87
+ print(response.analysis)
88
+ ```
89
+
90
+ While you can provide a `bearer_token` keyword argument,
91
+ we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
92
+ to add `HIDDENLAYER_TOKEN="My Bearer Token"` to your `.env` file
93
+ so that your Bearer Token is not stored in source control.
94
+
95
+ ## Async usage
96
+
97
+ Simply import `AsyncHiddenLayer` instead of `HiddenLayer` and use `await` with each API call:
98
+
99
+ ```python
100
+ import asyncio
101
+ from hiddenlayer import AsyncHiddenLayer
102
+
103
+ client = AsyncHiddenLayer(
104
+ # defaults to "prod-us".
105
+ environment="prod-eu",
106
+ )
107
+
108
+
109
+ async def main() -> None:
110
+ response = await client.interactions.analyze(
111
+ metadata={
112
+ "model": "REPLACE_ME",
113
+ "requester_id": "REPLACE_ME",
114
+ },
115
+ input={
116
+ "messages": [
117
+ {
118
+ "role": "user",
119
+ "content": "REPLACE_ME",
120
+ }
121
+ ]
122
+ },
123
+ )
124
+ print(response.analysis)
125
+
126
+
127
+ asyncio.run(main())
128
+ ```
129
+
130
+ Functionality between the synchronous and asynchronous clients is otherwise identical.
131
+
132
+ ### With aiohttp
133
+
134
+ By default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.
135
+
136
+ You can enable this by installing `aiohttp`:
137
+
138
+ ```sh
139
+ # install from PyPI
140
+ pip install hiddenlayer-sdk[aiohttp]
141
+ ```
142
+
143
+ Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
144
+
145
+ ```python
146
+ import asyncio
147
+ from hiddenlayer import DefaultAioHttpClient
148
+ from hiddenlayer import AsyncHiddenLayer
149
+
150
+
151
+ async def main() -> None:
152
+ async with AsyncHiddenLayer(
153
+ http_client=DefaultAioHttpClient(),
154
+ ) as client:
155
+ response = await client.interactions.analyze(
156
+ metadata={
157
+ "model": "REPLACE_ME",
158
+ "requester_id": "REPLACE_ME",
159
+ },
160
+ input={
161
+ "messages": [
162
+ {
163
+ "role": "user",
164
+ "content": "REPLACE_ME",
165
+ }
166
+ ]
167
+ },
168
+ )
169
+ print(response.analysis)
170
+
171
+
172
+ asyncio.run(main())
173
+ ```
174
+
175
+ ## Using types
176
+
177
+ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:
178
+
179
+ - Serializing back into JSON, `model.to_json()`
180
+ - Converting to a dictionary, `model.to_dict()`
181
+
182
+ Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
183
+
184
+ ## Nested params
185
+
186
+ Nested parameters are dictionaries, typed using `TypedDict`, for example:
187
+
188
+ ```python
189
+ from hiddenlayer import HiddenLayer
190
+
191
+ client = HiddenLayer()
192
+
193
+ response = client.interactions.analyze(
194
+ metadata={
195
+ "model": "gpt-5",
196
+ "requester_id": "user-1234",
197
+ "provider": "openai",
198
+ },
199
+ )
200
+ print(response.metadata)
201
+ ```
202
+
203
+ ## Handling errors
204
+
205
+ When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `hiddenlayer.APIConnectionError` is raised.
206
+
207
+ When the API returns a non-success status code (that is, 4xx or 5xx
208
+ response), a subclass of `hiddenlayer.APIStatusError` is raised, containing `status_code` and `response` properties.
209
+
210
+ All errors inherit from `hiddenlayer.APIError`.
211
+
212
+ ```python
213
+ import hiddenlayer
214
+ from hiddenlayer import HiddenLayer
215
+
216
+ client = HiddenLayer()
217
+
218
+ try:
219
+ client.interactions.analyze(
220
+ metadata={
221
+ "model": "REPLACE_ME",
222
+ "requester_id": "REPLACE_ME",
223
+ },
224
+ input={
225
+ "messages": [
226
+ {
227
+ "role": "user",
228
+ "content": "REPLACE_ME",
229
+ }
230
+ ]
231
+ },
232
+ )
233
+ except hiddenlayer.APIConnectionError as e:
234
+ print("The server could not be reached")
235
+ print(e.__cause__) # an underlying Exception, likely raised within httpx.
236
+ except hiddenlayer.RateLimitError as e:
237
+ print("A 429 status code was received; we should back off a bit.")
238
+ except hiddenlayer.APIStatusError as e:
239
+ print("Another non-200-range status code was received")
240
+ print(e.status_code)
241
+ print(e.response)
242
+ ```
243
+
244
+ Error codes are as follows:
245
+
246
+ | Status Code | Error Type |
247
+ | ----------- | -------------------------- |
248
+ | 400 | `BadRequestError` |
249
+ | 401 | `AuthenticationError` |
250
+ | 403 | `PermissionDeniedError` |
251
+ | 404 | `NotFoundError` |
252
+ | 422 | `UnprocessableEntityError` |
253
+ | 429 | `RateLimitError` |
254
+ | >=500 | `InternalServerError` |
255
+ | N/A | `APIConnectionError` |
256
+
257
+ ### Retries
258
+
259
+ Certain errors are automatically retried 2 times by default, with a short exponential backoff.
260
+ Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
261
+ 429 Rate Limit, and >=500 Internal errors are all retried by default.
262
+
263
+ You can use the `max_retries` option to configure or disable retry settings:
264
+
265
+ ```python
266
+ from hiddenlayer import HiddenLayer
267
+
268
+ # Configure the default for all requests:
269
+ client = HiddenLayer(
270
+ # default is 2
271
+ max_retries=0,
272
+ )
273
+
274
+ # Or, configure per-request:
275
+ client.with_options(max_retries=5).interactions.analyze(
276
+ metadata={
277
+ "model": "REPLACE_ME",
278
+ "requester_id": "REPLACE_ME",
279
+ },
280
+ input={
281
+ "messages": [
282
+ {
283
+ "role": "user",
284
+ "content": "REPLACE_ME",
285
+ }
286
+ ]
287
+ },
288
+ )
289
+ ```
290
+
291
+ ### Timeouts
292
+
293
+ By default requests time out after 1 minute. You can configure this with a `timeout` option,
294
+ which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
295
+
296
+ ```python
297
+ from hiddenlayer import HiddenLayer
298
+
299
+ # Configure the default for all requests:
300
+ client = HiddenLayer(
301
+ # 20 seconds (default is 1 minute)
302
+ timeout=20.0,
303
+ )
304
+
305
+ # More granular control:
306
+ client = HiddenLayer(
307
+ timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),
308
+ )
309
+
310
+ # Override per-request:
311
+ client.with_options(timeout=5.0).interactions.analyze(
312
+ metadata={
313
+ "model": "REPLACE_ME",
314
+ "requester_id": "REPLACE_ME",
315
+ },
316
+ input={
317
+ "messages": [
318
+ {
319
+ "role": "user",
320
+ "content": "REPLACE_ME",
321
+ }
322
+ ]
323
+ },
324
+ )
325
+ ```
326
+
327
+ On timeout, an `APITimeoutError` is thrown.
328
+
329
+ Note that requests that time out are [retried twice by default](https://github.com/hiddenlayerai/hiddenlayer-sdk-python/tree/main/#retries).
330
+
331
+ ## Advanced
332
+
333
+ ### Logging
334
+
335
+ We use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.
336
+
337
+ You can enable logging by setting the environment variable `HIDDENLAYER_LOG` to `info`.
338
+
339
+ ```shell
340
+ $ export HIDDENLAYER_LOG=info
341
+ ```
342
+
343
+ Or to `debug` for more verbose logging.
344
+
345
+ ### How to tell whether `None` means `null` or missing
346
+
347
+ In an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:
348
+
349
+ ```py
350
+ if response.my_field is None:
351
+ if 'my_field' not in response.model_fields_set:
352
+ print('Got json like {}, without a "my_field" key present at all.')
353
+ else:
354
+ print('Got json like {"my_field": null}.')
355
+ ```
356
+
357
+ ### Accessing raw response data (e.g. headers)
358
+
359
+ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,
360
+
361
+ ```py
362
+ from hiddenlayer import HiddenLayer
363
+
364
+ client = HiddenLayer()
365
+ response = client.interactions.with_raw_response.analyze(
366
+ metadata={
367
+ "model": "REPLACE_ME",
368
+ "requester_id": "REPLACE_ME",
369
+ },
370
+ input={
371
+ "messages": [{
372
+ "role": "user",
373
+ "content": "REPLACE_ME",
374
+ }]
375
+ },
376
+ )
377
+ print(response.headers.get('X-My-Header'))
378
+
379
+ interaction = response.parse() # get the object that `interactions.analyze()` would have returned
380
+ print(interaction.analysis)
381
+ ```
382
+
383
+ These methods return an [`APIResponse`](https://github.com/hiddenlayerai/hiddenlayer-sdk-python/tree/main/src/hiddenlayer/_response.py) object.
384
+
385
+ The async client returns an [`AsyncAPIResponse`](https://github.com/hiddenlayerai/hiddenlayer-sdk-python/tree/main/src/hiddenlayer/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
386
+
387
+ #### `.with_streaming_response`
388
+
389
+ The above interface eagerly reads the full response body when you make the request, which may not always be what you want.
390
+
391
+ To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
392
+
393
+ ```python
394
+ with client.interactions.with_streaming_response.analyze(
395
+ metadata={
396
+ "model": "REPLACE_ME",
397
+ "requester_id": "REPLACE_ME",
398
+ },
399
+ input={
400
+ "messages": [
401
+ {
402
+ "role": "user",
403
+ "content": "REPLACE_ME",
404
+ }
405
+ ]
406
+ },
407
+ ) as response:
408
+ print(response.headers.get("X-My-Header"))
409
+
410
+ for line in response.iter_lines():
411
+ print(line)
412
+ ```
413
+
414
+ The context manager is required so that the response will reliably be closed.
415
+
416
+ ### Making custom/undocumented requests
417
+
418
+ This library is typed for convenient access to the documented API.
419
+
420
+ If you need to access undocumented endpoints, params, or response properties, the library can still be used.
421
+
422
+ #### Undocumented endpoints
423
+
424
+ To make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other
425
+ http verbs. Options on the client will be respected (such as retries) when making this request.
426
+
427
+ ```py
428
+ import httpx
429
+
430
+ response = client.post(
431
+ "/foo",
432
+ cast_to=httpx.Response,
433
+ body={"my_param": True},
434
+ )
435
+
436
+ print(response.headers.get("x-foo"))
437
+ ```
438
+
439
+ #### Undocumented request params
440
+
441
+ If you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request
442
+ options.
443
+
444
+ #### Undocumented response properties
445
+
446
+ To access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You
447
+ can also get all the extra fields on the Pydantic model as a dict with
448
+ [`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).
449
+
450
+ ### Configuring the HTTP client
451
+
452
+ You can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:
453
+
454
+ - Support for [proxies](https://www.python-httpx.org/advanced/proxies/)
455
+ - Custom [transports](https://www.python-httpx.org/advanced/transports/)
456
+ - Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality
457
+
458
+ ```python
459
+ import httpx
460
+ from hiddenlayer import HiddenLayer, DefaultHttpxClient
461
+
462
+ client = HiddenLayer(
463
+ # Or use the `HIDDENLAYER_BASE_URL` env var
464
+ base_url="http://my.test.server.example.com:8083",
465
+ http_client=DefaultHttpxClient(
466
+ proxy="http://my.test.proxy.example.com",
467
+ transport=httpx.HTTPTransport(local_address="0.0.0.0"),
468
+ ),
469
+ )
470
+ ```
471
+
472
+ You can also customize the client on a per-request basis by using `with_options()`:
473
+
474
+ ```python
475
+ client.with_options(http_client=DefaultHttpxClient(...))
476
+ ```
477
+
478
+ ### Managing HTTP resources
479
+
480
+ By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.
481
+
482
+ ```py
483
+ from hiddenlayer import HiddenLayer
484
+
485
+ with HiddenLayer() as client:
486
+ # make requests here
487
+ ...
488
+
489
+ # HTTP client is now closed
490
+ ```
491
+
492
+ ## Versioning
493
+
494
+ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
495
+
496
+ 1. Changes that only affect static types, without breaking runtime behavior.
497
+ 2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
498
+ 3. Changes that we do not expect to impact the vast majority of users in practice.
499
+
500
+ We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
501
+
502
+ We are keen for your feedback; please open an [issue](https://www.github.com/hiddenlayerai/hiddenlayer-sdk-python/issues) with questions, bugs, or suggestions.
503
+
504
+ ### Determining the installed version
505
+
506
+ If you've upgraded to the latest version but aren't seeing any new features you were expecting then your python environment is likely still using an older version.
507
+
508
+ You can determine the version that is being used at runtime with:
509
+
510
+ ```py
511
+ import hiddenlayer
512
+ print(hiddenlayer.__version__)
513
+ ```
514
+
515
+ ## Requirements
516
+
517
+ Python 3.8 or higher.
518
+
519
+ ## Contributing
520
+
521
+ See [the contributing documentation](https://github.com/hiddenlayerai/hiddenlayer-sdk-python/tree/main/./CONTRIBUTING.md).
@@ -0,0 +1,82 @@
1
+ hiddenlayer/__init__.py,sha256=33Bm3ZcNLL6ctBd9Bos4nwE1eVey1gA4XpLzogpv2bk,2936
2
+ hiddenlayer/_base_client.py,sha256=GcAktlpnd-o1yvoo9B0Q5a-Yty11vxzlMewsgq4qOUA,67052
3
+ hiddenlayer/_client.py,sha256=FJV3hM18lXNpWLbMvbYkL29-lOkMtoMIOcuznuyjNiA,28892
4
+ hiddenlayer/_compat.py,sha256=DQBVORjFb33zch24jzkhM14msvnzY7mmSmgDLaVFUM8,6562
5
+ hiddenlayer/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
6
+ hiddenlayer/_exceptions.py,sha256=7KiNt6qeOqZYIwFpA97ZFqBGWzEb7kz5w1XwnBmbXXU,3230
7
+ hiddenlayer/_files.py,sha256=KnEzGi_O756MvKyJ4fOCW_u3JhOeWPQ4RsmDvqihDQU,3545
8
+ hiddenlayer/_models.py,sha256=lKnskYPONAWDvWo8tmbbVk7HmG7UOsI0Nve0vSMmkRc,30452
9
+ hiddenlayer/_oauth2.py,sha256=s0souIAKq8caGatoNEXISgB7g8IVLOBMxN6HuUYNlZk,3900
10
+ hiddenlayer/_qs.py,sha256=craIKyvPktJ94cvf9zn8j8ekG9dWJzhWv0ob34lIOv4,4828
11
+ hiddenlayer/_resource.py,sha256=2gb_vW4S82SKkbromH5bXbjusfdkg50fqatzePjeU44,1130
12
+ hiddenlayer/_response.py,sha256=NQRPhM9il3hR8Oh8HyH-aAGHn2-y464jtVbTWt5SfAU,28848
13
+ hiddenlayer/_streaming.py,sha256=nI65s60yoKWveXysHG-Ly-moTTIbn44wSVTb6A1wxyU,10120
14
+ hiddenlayer/_types.py,sha256=jJ_NDtjSV3hOcBV3vEPtp5ORmpoKIKnrD_uqvwzFzb8,7241
15
+ hiddenlayer/_version.py,sha256=OB7zD1GDSoq7oHiTUkL0ubMnRRH9Pq9xtuR8eGru_u0,163
16
+ hiddenlayer/pagination.py,sha256=WQtuZxl0jOJBsIRn8-IxBqbv2F4HzDBYzY1gLlXIqds,3558
17
+ hiddenlayer/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
+ hiddenlayer/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
19
+ hiddenlayer/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
20
+ hiddenlayer/_utils/_datetime_parse.py,sha256=bABTs0Bc6rabdFvnIwXjEhWL15TcRgWZ_6XGTqN8xUk,4204
21
+ hiddenlayer/_utils/_logs.py,sha256=_MFaWgAQd0o731P-cdPnAKeoL_cL-MuiquZGF5xBMkg,789
22
+ hiddenlayer/_utils/_proxy.py,sha256=aglnj2yBTDyGX9Akk2crZHrl10oqRmceUy2Zp008XEs,1975
23
+ hiddenlayer/_utils/_reflection.py,sha256=ZmGkIgT_PuwedyNBrrKGbxoWtkpytJNU1uU4QHnmEMU,1364
24
+ hiddenlayer/_utils/_resources_proxy.py,sha256=e4YKvw6fYGQgixhGfjreSPPM7oPmC0IZ4086h2d6H1w,614
25
+ hiddenlayer/_utils/_streams.py,sha256=SMC90diFFecpEg_zgDRVbdR3hSEIgVVij4taD-noMLM,289
26
+ hiddenlayer/_utils/_sync.py,sha256=TpGLrrhRNWTJtODNE6Fup3_k7zrWm1j2RlirzBwre-0,2862
27
+ hiddenlayer/_utils/_transform.py,sha256=NjCzmnfqYrsAikUHQig6N9QfuTVbKipuP3ur9mcNF-E,15951
28
+ hiddenlayer/_utils/_typing.py,sha256=N_5PPuFNsaygbtA_npZd98SVN1LQQvFTKL6bkWPBZGU,4786
29
+ hiddenlayer/_utils/_utils.py,sha256=0dDqauUbVZEXV0NVl7Bwu904Wwo5eyFCZpQThhFNhyA,12253
30
+ hiddenlayer/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
31
+ hiddenlayer/lib/__init__.py,sha256=oiTTRCYF7y8tIvultJMmXYskwcBvL17DBMnP7Ba-z9U,259
32
+ hiddenlayer/lib/community_scan.py,sha256=b76aRTXw7-LRcr9ud3QcGJm6TxcODELf57So6KXmeA4,6019
33
+ hiddenlayer/lib/model_scan.py,sha256=GrwMZUntaIwRIj6ufjLTqawXKCkF3MUPOWWLX0R9YI0,27395
34
+ hiddenlayer/lib/scan_utils.py,sha256=GdHAaaUVW6tnSaqpRqiU7ZKnRz7GratqCOh7BnePXYc,4853
35
+ hiddenlayer/resources/__init__.py,sha256=xkR6NS_c3hJoiowVcO-BPwPzCnTHV5O9JYmtDXrH8dw,2535
36
+ hiddenlayer/resources/interactions.py,sha256=jpFBxSWKF6VRlf-gdD9Huvss6S0O9x85Gn7e9vSOF7I,7753
37
+ hiddenlayer/resources/prompt_analyzer.py,sha256=deb5KymcnC_tOO6NNAY6RWEiaMSakNmQ08n4HOm_NR0,7741
38
+ hiddenlayer/resources/sensors.py,sha256=jrwjT6KFErnLzZUs06CVh8iNodN9jUj-1vgzP_nF_y0,22233
39
+ hiddenlayer/resources/models/__init__.py,sha256=u34NP3OXwz5AMpZWFSif-DAeObv0i2qbUuaiqK5vV1w,989
40
+ hiddenlayer/resources/models/cards.py,sha256=ZqRmSBMAV81bPpcX8uG0-7wkf3L2VQO7CRqhEGjIQxI,10037
41
+ hiddenlayer/resources/models/models.py,sha256=fcqZwIEw5xGpcvVNJaT98vZcxu1LHm73KbIQCDyQjIo,10633
42
+ hiddenlayer/resources/scans/__init__.py,sha256=Nk30F5DCEcreqEo9O648f9zs1GVPAq9a8t1bLRdK5jk,1876
43
+ hiddenlayer/resources/scans/jobs.py,sha256=gHYqOqg5B-BgwCFsQiy9_YAKzLx0IVEH0OhsrD9wYos,19177
44
+ hiddenlayer/resources/scans/results.py,sha256=80h9OUIYsc2J9Nqu0vQs2Ra1VYt7TNjNGxCmAQAdeXU,6340
45
+ hiddenlayer/resources/scans/scans.py,sha256=b0CZZ1jsQtLmf7h0C_kXExvS0MuDy5UP67WvSjgJyNU,5719
46
+ hiddenlayer/resources/scans/upload/__init__.py,sha256=aguQflI_0cmjU-4YqX3OYQ5kawYB3szm2v4CROTJbWQ,976
47
+ hiddenlayer/resources/scans/upload/file.py,sha256=Esvt604lV0-nlvLNgIPo8akyBq2AboQroR3XcRmN1nI,10350
48
+ hiddenlayer/resources/scans/upload/upload.py,sha256=bZJ3Amu6t6zXRpdFk9r408TX0xgvSGsgDt-QPGtQofA,12637
49
+ hiddenlayer/types/__init__.py,sha256=GXxQCChqx12t33aB5yq_k79eD5HUHeYzl6viH8TW-iA,1154
50
+ hiddenlayer/types/interaction_analyze_params.py,sha256=MrrFeEgv5kzg-QesEYQdvFfuQ62rouK1fIgny1Gffyw,1694
51
+ hiddenlayer/types/interaction_analyze_response.py,sha256=_EvX7Q93FsF_U3NAsiJUexOABPWwyIpCLoVrUwe783c,5824
52
+ hiddenlayer/types/model_retrieve_response.py,sha256=3iUERIZ4gguWZ1i9YjMg2mZZRh21DWpOk3aycAs6YR8,1165
53
+ hiddenlayer/types/prompt_analyzer_create_params.py,sha256=wWPc1STT2ruBnuBG3c_7pEQLEifXUBFJrq6SAGIz848,604
54
+ hiddenlayer/types/prompt_analyzer_create_response.py,sha256=H6Kg2-y0Q1BLOlRGtKfRz33YyGeYH-XVZxfZ4AQN50I,11314
55
+ hiddenlayer/types/sensor_create_params.py,sha256=1eu695hdwEQQJM2nZOAjxip3qwMJHghW3sTi0Bizwq0,523
56
+ hiddenlayer/types/sensor_create_response.py,sha256=83Vrcohq02Dg3jAZ2CsRq-C0O73WDjmPw3RMfgw6Ebs,667
57
+ hiddenlayer/types/sensor_query_params.py,sha256=S6ZWs31hBwcCLkzQWtf4-6bEhcQi-I1KThiV-tIOhjU,867
58
+ hiddenlayer/types/sensor_query_response.py,sha256=ghr04n5lUmPs_PNPxGJLujuoMAsemFsfr-0f2lc0VUM,798
59
+ hiddenlayer/types/sensor_retrieve_response.py,sha256=7H262Rk2GlGjORP7GYwUx0Y7lmwy33kscLv29IjTXbQ,671
60
+ hiddenlayer/types/sensor_update_params.py,sha256=PG78VcDNZNLSTSyVO_falMUOZDWte2QopXF9SI2bM-I,468
61
+ hiddenlayer/types/sensor_update_response.py,sha256=Ag3SJmmMwQVQrJXFfd2VmHgNRkSzkRMO18xfJZMHpek,212
62
+ hiddenlayer/types/models/__init__.py,sha256=IKIsHDwjHY4w4W9AEkVcpuz5OAmRRMdeXnAUan7B914,255
63
+ hiddenlayer/types/models/card_list_params.py,sha256=2FdRKJo-VjMyF3zMiH6RkwB4tdBAmeB3STSIMS2gnII,1650
64
+ hiddenlayer/types/models/card_list_response.py,sha256=vjsro8Y1H2zOPZq_IeJssB9MNYYPTIp8C-bMC-THG8o,1311
65
+ hiddenlayer/types/scans/__init__.py,sha256=C0Q2Un0WDwBgq1fBZ6eZOZSr08qnCdj8OunED0gX3qc,806
66
+ hiddenlayer/types/scans/job_list_params.py,sha256=ml8Oezdk2RKgB7hIId3IOTmnDWeVrCvVsbj5YZyiBmk,1911
67
+ hiddenlayer/types/scans/job_list_response.py,sha256=ccGFUSkoY4HipftQq_VXpjM0gdIhPCkYeV8CHpWXdTw,582
68
+ hiddenlayer/types/scans/job_request_params.py,sha256=P4_3vxfILORfEUeza8KoPupSNtNgj0dYoMwp0rQVo6o,1241
69
+ hiddenlayer/types/scans/job_retrieve_params.py,sha256=1qidN2xxwgDpshevghEKiQKIPXwpLWYgWYIxTv-xOx4,476
70
+ hiddenlayer/types/scans/result_sarif_response.py,sha256=rkP9Y4n1nilht9Ov0pDoFlamzryqYyTVffVhGTjC-U0,200
71
+ hiddenlayer/types/scans/scan_job.py,sha256=axX_Ydbzbadvw9u2AaTjUC8r8yeC0MBSgqD7hHlD3RU,1266
72
+ hiddenlayer/types/scans/scan_report.py,sha256=iHbmSU9rjXYQhKNy304YG1QF1GU2S8ysOTT5G41UmCE,9693
73
+ hiddenlayer/types/scans/upload_complete_all_response.py,sha256=ovVjWqsrXJ7OOMhWX4RpR1STiM0fV4YMfA0x1AK7IaM,314
74
+ hiddenlayer/types/scans/upload_start_params.py,sha256=GSRF_30snIBUG-Cn0dQwslIavV0CvqweKvYsR3wfjcc,893
75
+ hiddenlayer/types/scans/upload_start_response.py,sha256=wDzz5DDAC0MIDKAdMsHa0Y1GRS5kfPPgTRJtY4I5cI0,302
76
+ hiddenlayer/types/scans/upload/__init__.py,sha256=NVyWXWAU49cRCA-8XaJvK4HSkFh7t7bEWDjuJ3gwSnM,270
77
+ hiddenlayer/types/scans/upload/file_add_response.py,sha256=oqEXlFo6XlmPlaJgr6l4yjx6Mp20LNfSbvzKrMxZsjU,492
78
+ hiddenlayer/types/scans/upload/file_complete_response.py,sha256=zhoV24Z_dyD0aP174viJyno5b8P7BG4hizOtPGdps0I,305
79
+ hiddenlayer_sdk-3.0.1.dist-info/METADATA,sha256=hPtSxHNAJIAf_rpNIuf_ETeureHmh4RVnQrGePKgn5A,16356
80
+ hiddenlayer_sdk-3.0.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
81
+ hiddenlayer_sdk-3.0.1.dist-info/licenses/LICENSE,sha256=5_TlOiFFpqKABs8i1L9AimAZ096K4ItapeGm2Qo-RiA,11341
82
+ hiddenlayer_sdk-3.0.1.dist-info/RECORD,,
@@ -1,5 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: hatchling 1.27.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
-
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright [yyyy] [name of copyright owner]
189
+ Copyright 2025 HiddenLayer
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
@@ -1,26 +0,0 @@
1
- from enum import Enum
2
-
3
-
4
- class CommunityScanSource(str, Enum):
5
- LOCAL = "LOCAL"
6
- AWS_PRESIGNED = "AWS_PRESIGNED"
7
- AWS_IAM_ROLE = "AWS_IAM_ROLE"
8
- AZURE_BLOB_SAS = "AZURE_BLOB_SAS"
9
- AZURE_BLOB_AD = "AZURE_BLOB_AD"
10
- GOOGLE_SIGNED = "GOOGLE_SIGNED"
11
- GOOGLE_OAUTH = "GOOGLE_OAUTH"
12
- HUGGING_FACE = "HUGGING_FACE"
13
-
14
-
15
- class ScanStatus(str, Enum):
16
- DONE = "done"
17
- ACCEPTED = "accepted"
18
- FAILED = "failed"
19
- PENDING = "pending"
20
- CREATED = "created"
21
- RETRY = "retry"
22
-
23
-
24
- class ApiErrors(str, Enum):
25
- NON_ADHOC_SENSOR_DELETE = "only adhoc sensors may be deleted"
26
- SENSOR_EXISTS = "already exists"
@@ -1,12 +0,0 @@
1
- class HiddenlayerConflictError(Exception):
2
- """Generic error class for API errors from a 409 error code."""
3
-
4
- pass
5
-
6
-
7
- class SensorDoesNotExistError(Exception):
8
- pass
9
-
10
-
11
- class IncompatibleModelError(Exception):
12
- pass