beetkeeper-api-client 0.12.0__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.
- beetkeeper_api_client/__init__.py +112 -0
- beetkeeper_api_client/_scm_version.py +1 -0
- beetkeeper_api_client/api/__init__.py +9 -0
- beetkeeper_api_client/api/authentication_api.py +758 -0
- beetkeeper_api_client/api/events_api.py +1663 -0
- beetkeeper_api_client/api/imports_api.py +3134 -0
- beetkeeper_api_client/api/monitoring_api.py +377 -0
- beetkeeper_api_client/api/query_api.py +1250 -0
- beetkeeper_api_client/api_client.py +845 -0
- beetkeeper_api_client/api_response.py +21 -0
- beetkeeper_api_client/configuration.py +604 -0
- beetkeeper_api_client/exceptions.py +218 -0
- beetkeeper_api_client/models/__init__.py +44 -0
- beetkeeper_api_client/models/api_album.py +285 -0
- beetkeeper_api_client/models/api_track.py +528 -0
- beetkeeper_api_client/models/beets_event_type.py +40 -0
- beetkeeper_api_client/models/clean_slate_preview.py +147 -0
- beetkeeper_api_client/models/clean_slate_submit_request.py +116 -0
- beetkeeper_api_client/models/current_beets_subject_state.py +140 -0
- beetkeeper_api_client/models/decision_request.py +104 -0
- beetkeeper_api_client/models/event_search_response.py +97 -0
- beetkeeper_api_client/models/event_search_result.py +107 -0
- beetkeeper_api_client/models/event_subject_summary.py +100 -0
- beetkeeper_api_client/models/events_list_response.py +95 -0
- beetkeeper_api_client/models/find_missing_source_path_request.py +100 -0
- beetkeeper_api_client/models/find_missing_source_path_response.py +108 -0
- beetkeeper_api_client/models/health_info.py +101 -0
- beetkeeper_api_client/models/http_validation_error.py +95 -0
- beetkeeper_api_client/models/import_action.py +38 -0
- beetkeeper_api_client/models/import_candidate.py +171 -0
- beetkeeper_api_client/models/import_decision.py +96 -0
- beetkeeper_api_client/models/import_job.py +162 -0
- beetkeeper_api_client/models/import_job_status.py +41 -0
- beetkeeper_api_client/models/import_submit_request.py +104 -0
- beetkeeper_api_client/models/listener_event_details.py +121 -0
- beetkeeper_api_client/models/location_inner.py +138 -0
- beetkeeper_api_client/models/login_request_body.py +90 -0
- beetkeeper_api_client/models/login_response_body.py +100 -0
- beetkeeper_api_client/models/logout_response_body.py +88 -0
- beetkeeper_api_client/models/search_missing_source_path_result.py +106 -0
- beetkeeper_api_client/models/validation_error.py +108 -0
- beetkeeper_api_client/py.typed +0 -0
- beetkeeper_api_client/rest.py +201 -0
- beetkeeper_api_client/sync_helper.py +57 -0
- beetkeeper_api_client-0.12.0.dist-info/METADATA +34 -0
- beetkeeper_api_client-0.12.0.dist-info/RECORD +48 -0
- beetkeeper_api_client-0.12.0.dist-info/WHEEL +5 -0
- beetkeeper_api_client-0.12.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
"""
|
|
2
|
+
beetkeeper
|
|
3
|
+
|
|
4
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document:
|
|
7
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
8
|
+
|
|
9
|
+
Do not edit the class manually.
|
|
10
|
+
""" # noqa: E501
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
import warnings
|
|
14
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
15
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
16
|
+
from typing_extensions import Annotated
|
|
17
|
+
|
|
18
|
+
from beetkeeper_api_client.models.health_info import HealthInfo
|
|
19
|
+
|
|
20
|
+
from beetkeeper_api_client.api_client import ApiClient, RequestSerialized
|
|
21
|
+
from beetkeeper_api_client.api_response import ApiResponse
|
|
22
|
+
from beetkeeper_api_client.rest import RESTResponseType
|
|
23
|
+
from beetkeeper_api_client.sync_helper import run_sync
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class MonitoringApi:
|
|
27
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
28
|
+
Ref: https://openapi-generator.tech
|
|
29
|
+
|
|
30
|
+
Do not edit the class manually.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
def __init__(self, api_client=None) -> None:
|
|
34
|
+
if api_client is None:
|
|
35
|
+
api_client = ApiClient.get_default()
|
|
36
|
+
self.api_client = api_client
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
@validate_call
|
|
40
|
+
async def health_api_health_get(
|
|
41
|
+
self,
|
|
42
|
+
_request_timeout: Union[
|
|
43
|
+
None,
|
|
44
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
45
|
+
Tuple[
|
|
46
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
47
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
48
|
+
]
|
|
49
|
+
] = None,
|
|
50
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
51
|
+
_content_type: Optional[StrictStr] = None,
|
|
52
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
53
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
54
|
+
) -> HealthInfo:
|
|
55
|
+
"""Health
|
|
56
|
+
|
|
57
|
+
Report this process's pid, the current import leader (the `import_lock` holder), and the shared job count. The server runs as a single worker process, so the serving pid and the leader normally coincide; the lease fields remain observable because job state and the lock are DB-backed (and survive restarts).
|
|
58
|
+
|
|
59
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
60
|
+
number provided, it will be total request
|
|
61
|
+
timeout. It can also be a pair (tuple) of
|
|
62
|
+
(connection, read) timeouts.
|
|
63
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
64
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
65
|
+
request; this effectively ignores the
|
|
66
|
+
authentication in the spec for a single request.
|
|
67
|
+
:type _request_auth: dict, optional
|
|
68
|
+
:param _content_type: force content-type for the request.
|
|
69
|
+
:type _content_type: str, Optional
|
|
70
|
+
:param _headers: set to override the headers for a single
|
|
71
|
+
request; this effectively ignores the headers
|
|
72
|
+
in the spec for a single request.
|
|
73
|
+
:type _headers: dict, optional
|
|
74
|
+
:param _host_index: set to override the host_index for a single
|
|
75
|
+
request; this effectively ignores the host_index
|
|
76
|
+
in the spec for a single request.
|
|
77
|
+
:type _host_index: int, optional
|
|
78
|
+
:return: Returns the result object.
|
|
79
|
+
""" # noqa: E501
|
|
80
|
+
|
|
81
|
+
_param = self._health_api_health_get_serialize(
|
|
82
|
+
_request_auth=_request_auth,
|
|
83
|
+
_content_type=_content_type,
|
|
84
|
+
_headers=_headers,
|
|
85
|
+
_host_index=_host_index
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
89
|
+
'200': "HealthInfo",
|
|
90
|
+
}
|
|
91
|
+
response_data = await self.api_client.call_api(
|
|
92
|
+
*_param,
|
|
93
|
+
_request_timeout=_request_timeout
|
|
94
|
+
)
|
|
95
|
+
await response_data.read()
|
|
96
|
+
return self.api_client.response_deserialize(
|
|
97
|
+
response_data=response_data,
|
|
98
|
+
response_types_map=_response_types_map,
|
|
99
|
+
).data
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
@validate_call
|
|
103
|
+
async def health_api_health_get_with_http_info(
|
|
104
|
+
self,
|
|
105
|
+
_request_timeout: Union[
|
|
106
|
+
None,
|
|
107
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
108
|
+
Tuple[
|
|
109
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
110
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
111
|
+
]
|
|
112
|
+
] = None,
|
|
113
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
114
|
+
_content_type: Optional[StrictStr] = None,
|
|
115
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
116
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
117
|
+
) -> ApiResponse[HealthInfo]:
|
|
118
|
+
"""Health
|
|
119
|
+
|
|
120
|
+
Report this process's pid, the current import leader (the `import_lock` holder), and the shared job count. The server runs as a single worker process, so the serving pid and the leader normally coincide; the lease fields remain observable because job state and the lock are DB-backed (and survive restarts).
|
|
121
|
+
|
|
122
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
123
|
+
number provided, it will be total request
|
|
124
|
+
timeout. It can also be a pair (tuple) of
|
|
125
|
+
(connection, read) timeouts.
|
|
126
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
127
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
128
|
+
request; this effectively ignores the
|
|
129
|
+
authentication in the spec for a single request.
|
|
130
|
+
:type _request_auth: dict, optional
|
|
131
|
+
:param _content_type: force content-type for the request.
|
|
132
|
+
:type _content_type: str, Optional
|
|
133
|
+
:param _headers: set to override the headers for a single
|
|
134
|
+
request; this effectively ignores the headers
|
|
135
|
+
in the spec for a single request.
|
|
136
|
+
:type _headers: dict, optional
|
|
137
|
+
:param _host_index: set to override the host_index for a single
|
|
138
|
+
request; this effectively ignores the host_index
|
|
139
|
+
in the spec for a single request.
|
|
140
|
+
:type _host_index: int, optional
|
|
141
|
+
:return: Returns the result object.
|
|
142
|
+
""" # noqa: E501
|
|
143
|
+
|
|
144
|
+
_param = self._health_api_health_get_serialize(
|
|
145
|
+
_request_auth=_request_auth,
|
|
146
|
+
_content_type=_content_type,
|
|
147
|
+
_headers=_headers,
|
|
148
|
+
_host_index=_host_index
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
152
|
+
'200': "HealthInfo",
|
|
153
|
+
}
|
|
154
|
+
response_data = await self.api_client.call_api(
|
|
155
|
+
*_param,
|
|
156
|
+
_request_timeout=_request_timeout
|
|
157
|
+
)
|
|
158
|
+
await response_data.read()
|
|
159
|
+
return self.api_client.response_deserialize(
|
|
160
|
+
response_data=response_data,
|
|
161
|
+
response_types_map=_response_types_map,
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
@validate_call
|
|
166
|
+
async def health_api_health_get_without_preload_content(
|
|
167
|
+
self,
|
|
168
|
+
_request_timeout: Union[
|
|
169
|
+
None,
|
|
170
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
171
|
+
Tuple[
|
|
172
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
173
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
174
|
+
]
|
|
175
|
+
] = None,
|
|
176
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
177
|
+
_content_type: Optional[StrictStr] = None,
|
|
178
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
179
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
180
|
+
) -> RESTResponseType:
|
|
181
|
+
"""Health
|
|
182
|
+
|
|
183
|
+
Report this process's pid, the current import leader (the `import_lock` holder), and the shared job count. The server runs as a single worker process, so the serving pid and the leader normally coincide; the lease fields remain observable because job state and the lock are DB-backed (and survive restarts).
|
|
184
|
+
|
|
185
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
186
|
+
number provided, it will be total request
|
|
187
|
+
timeout. It can also be a pair (tuple) of
|
|
188
|
+
(connection, read) timeouts.
|
|
189
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
190
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
191
|
+
request; this effectively ignores the
|
|
192
|
+
authentication in the spec for a single request.
|
|
193
|
+
:type _request_auth: dict, optional
|
|
194
|
+
:param _content_type: force content-type for the request.
|
|
195
|
+
:type _content_type: str, Optional
|
|
196
|
+
:param _headers: set to override the headers for a single
|
|
197
|
+
request; this effectively ignores the headers
|
|
198
|
+
in the spec for a single request.
|
|
199
|
+
:type _headers: dict, optional
|
|
200
|
+
:param _host_index: set to override the host_index for a single
|
|
201
|
+
request; this effectively ignores the host_index
|
|
202
|
+
in the spec for a single request.
|
|
203
|
+
:type _host_index: int, optional
|
|
204
|
+
:return: Returns the result object.
|
|
205
|
+
""" # noqa: E501
|
|
206
|
+
|
|
207
|
+
_param = self._health_api_health_get_serialize(
|
|
208
|
+
_request_auth=_request_auth,
|
|
209
|
+
_content_type=_content_type,
|
|
210
|
+
_headers=_headers,
|
|
211
|
+
_host_index=_host_index
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
215
|
+
'200': "HealthInfo",
|
|
216
|
+
}
|
|
217
|
+
response_data = await self.api_client.call_api(
|
|
218
|
+
*_param,
|
|
219
|
+
_request_timeout=_request_timeout
|
|
220
|
+
)
|
|
221
|
+
return response_data.response
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
@validate_call
|
|
225
|
+
def health_api_health_get_sync(
|
|
226
|
+
self,
|
|
227
|
+
_request_timeout: Union[
|
|
228
|
+
None,
|
|
229
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
230
|
+
Tuple[
|
|
231
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
232
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
233
|
+
]
|
|
234
|
+
] = None,
|
|
235
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
236
|
+
_content_type: Optional[StrictStr] = None,
|
|
237
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
238
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
239
|
+
) -> HealthInfo:
|
|
240
|
+
"""Health (synchronous)
|
|
241
|
+
|
|
242
|
+
Synchronous variant of :meth:`health_api_health_get`. It calls the asynchronous
|
|
243
|
+
method and blocks until it completes.
|
|
244
|
+
""" # noqa: E501
|
|
245
|
+
return run_sync(
|
|
246
|
+
self.health_api_health_get(
|
|
247
|
+
_request_timeout=_request_timeout,
|
|
248
|
+
_request_auth=_request_auth,
|
|
249
|
+
_content_type=_content_type,
|
|
250
|
+
_headers=_headers,
|
|
251
|
+
_host_index=_host_index,
|
|
252
|
+
)
|
|
253
|
+
)
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
@validate_call
|
|
257
|
+
def health_api_health_get_sync_with_http_info(
|
|
258
|
+
self,
|
|
259
|
+
_request_timeout: Union[
|
|
260
|
+
None,
|
|
261
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
262
|
+
Tuple[
|
|
263
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
264
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
265
|
+
]
|
|
266
|
+
] = None,
|
|
267
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
268
|
+
_content_type: Optional[StrictStr] = None,
|
|
269
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
270
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
271
|
+
) -> ApiResponse[HealthInfo]:
|
|
272
|
+
"""Health (synchronous)
|
|
273
|
+
|
|
274
|
+
Synchronous variant of :meth:`health_api_health_get_with_http_info`. It calls the
|
|
275
|
+
asynchronous method and blocks until it completes.
|
|
276
|
+
""" # noqa: E501
|
|
277
|
+
return run_sync(
|
|
278
|
+
self.health_api_health_get_with_http_info(
|
|
279
|
+
_request_timeout=_request_timeout,
|
|
280
|
+
_request_auth=_request_auth,
|
|
281
|
+
_content_type=_content_type,
|
|
282
|
+
_headers=_headers,
|
|
283
|
+
_host_index=_host_index,
|
|
284
|
+
)
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
@validate_call
|
|
289
|
+
def health_api_health_get_sync_without_preload_content(
|
|
290
|
+
self,
|
|
291
|
+
_request_timeout: Union[
|
|
292
|
+
None,
|
|
293
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
294
|
+
Tuple[
|
|
295
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
296
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
297
|
+
]
|
|
298
|
+
] = None,
|
|
299
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
300
|
+
_content_type: Optional[StrictStr] = None,
|
|
301
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
302
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
303
|
+
) -> RESTResponseType:
|
|
304
|
+
"""Health (synchronous)
|
|
305
|
+
|
|
306
|
+
Synchronous variant of :meth:`health_api_health_get_without_preload_content`. It calls
|
|
307
|
+
the asynchronous method and blocks until it completes.
|
|
308
|
+
""" # noqa: E501
|
|
309
|
+
return run_sync(
|
|
310
|
+
self.health_api_health_get_without_preload_content(
|
|
311
|
+
_request_timeout=_request_timeout,
|
|
312
|
+
_request_auth=_request_auth,
|
|
313
|
+
_content_type=_content_type,
|
|
314
|
+
_headers=_headers,
|
|
315
|
+
_host_index=_host_index,
|
|
316
|
+
)
|
|
317
|
+
)
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
def _health_api_health_get_serialize(
|
|
321
|
+
self,
|
|
322
|
+
_request_auth,
|
|
323
|
+
_content_type,
|
|
324
|
+
_headers,
|
|
325
|
+
_host_index,
|
|
326
|
+
) -> RequestSerialized:
|
|
327
|
+
|
|
328
|
+
_host = None
|
|
329
|
+
|
|
330
|
+
_collection_formats: Dict[str, str] = {
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
_path_params: Dict[str, str] = {}
|
|
334
|
+
_query_params: List[Tuple[str, str]] = []
|
|
335
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
336
|
+
_form_params: List[Tuple[str, str]] = []
|
|
337
|
+
_files: Dict[
|
|
338
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
339
|
+
] = {}
|
|
340
|
+
_body_params: Optional[bytes] = None
|
|
341
|
+
|
|
342
|
+
# process the path parameters
|
|
343
|
+
# process the query parameters
|
|
344
|
+
# process the header parameters
|
|
345
|
+
# process the form parameters
|
|
346
|
+
# process the body parameter
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
# set the HTTP header `Accept`
|
|
350
|
+
if 'Accept' not in _header_params:
|
|
351
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
352
|
+
[
|
|
353
|
+
'application/json'
|
|
354
|
+
]
|
|
355
|
+
)
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
# authentication setting
|
|
359
|
+
_auth_settings: List[str] = [
|
|
360
|
+
]
|
|
361
|
+
|
|
362
|
+
return self.api_client.param_serialize(
|
|
363
|
+
method='GET',
|
|
364
|
+
resource_path='/api/health',
|
|
365
|
+
path_params=_path_params,
|
|
366
|
+
query_params=_query_params,
|
|
367
|
+
header_params=_header_params,
|
|
368
|
+
body=_body_params,
|
|
369
|
+
post_params=_form_params,
|
|
370
|
+
files=_files,
|
|
371
|
+
auth_settings=_auth_settings,
|
|
372
|
+
collection_formats=_collection_formats,
|
|
373
|
+
_host=_host,
|
|
374
|
+
_request_auth=_request_auth
|
|
375
|
+
)
|
|
376
|
+
|
|
377
|
+
|