pulp-python-client 3.12.5__py3-none-any.whl → 3.13.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.

Potentially problematic release.


This version of pulp-python-client might be problematic. Click here for more details.

Files changed (68) hide show
  1. pulp_python_client-3.13.0.dist-info/METADATA +17 -0
  2. pulp_python_client-3.13.0.dist-info/RECORD +64 -0
  3. {pulp_python_client-3.12.5.dist-info → pulp_python_client-3.13.0.dist-info}/WHEEL +1 -1
  4. pulpcore/client/pulp_python/__init__.py +9 -10
  5. pulpcore/client/pulp_python/api/__init__.py +1 -2
  6. pulpcore/client/pulp_python/api/content_packages_api.py +1800 -655
  7. pulpcore/client/pulp_python/api/distributions_pypi_api.py +3755 -1474
  8. pulpcore/client/pulp_python/api/publications_pypi_api.py +2574 -982
  9. pulpcore/client/pulp_python/api/pypi_api.py +302 -128
  10. pulpcore/client/pulp_python/api/pypi_legacy_api.py +326 -153
  11. pulpcore/client/pulp_python/api/pypi_metadata_api.py +319 -139
  12. pulpcore/client/pulp_python/api/pypi_simple_api.py +899 -382
  13. pulpcore/client/pulp_python/api/remotes_python_api.py +4092 -1589
  14. pulpcore/client/pulp_python/api/repositories_python_api.py +4380 -1719
  15. pulpcore/client/pulp_python/api/repositories_python_versions_api.py +1526 -561
  16. pulpcore/client/pulp_python/api_client.py +444 -313
  17. pulpcore/client/pulp_python/api_response.py +21 -0
  18. pulpcore/client/pulp_python/configuration.py +266 -73
  19. pulpcore/client/pulp_python/exceptions.py +99 -20
  20. pulpcore/client/pulp_python/models/__init__.py +5 -8
  21. pulpcore/client/pulp_python/models/async_operation_response.py +60 -96
  22. pulpcore/client/pulp_python/models/content_summary_response.py +70 -154
  23. pulpcore/client/pulp_python/models/exclude_platforms_enum.py +19 -82
  24. pulpcore/client/pulp_python/models/my_permissions_response.py +60 -94
  25. pulpcore/client/pulp_python/models/nested_role.py +71 -155
  26. pulpcore/client/pulp_python/models/nested_role_response.py +70 -152
  27. pulpcore/client/pulp_python/models/object_roles_response.py +70 -96
  28. pulpcore/client/pulp_python/models/package_metadata_response.py +91 -191
  29. pulpcore/client/pulp_python/models/package_types_enum.py +23 -86
  30. pulpcore/client/pulp_python/models/package_upload_task_response.py +85 -154
  31. pulpcore/client/pulp_python/models/paginated_repository_version_response_list.py +94 -181
  32. pulpcore/client/pulp_python/models/paginatedpython_python_distribution_response_list.py +94 -181
  33. pulpcore/client/pulp_python/models/paginatedpython_python_package_content_response_list.py +94 -181
  34. pulpcore/client/pulp_python/models/paginatedpython_python_publication_response_list.py +94 -181
  35. pulpcore/client/pulp_python/models/paginatedpython_python_remote_response_list.py +94 -181
  36. pulpcore/client/pulp_python/models/paginatedpython_python_repository_response_list.py +94 -181
  37. pulpcore/client/pulp_python/models/patchedpython_python_distribution.py +108 -330
  38. pulpcore/client/pulp_python/models/patchedpython_python_remote.py +204 -864
  39. pulpcore/client/pulp_python/models/patchedpython_python_repository.py +96 -249
  40. pulpcore/client/pulp_python/models/policy_enum.py +18 -81
  41. pulpcore/client/pulp_python/models/python_python_distribution.py +108 -332
  42. pulpcore/client/pulp_python/models/python_python_distribution_response.py +132 -490
  43. pulpcore/client/pulp_python/models/python_python_package_content_response.py +182 -972
  44. pulpcore/client/pulp_python/models/python_python_publication.py +68 -127
  45. pulpcore/client/pulp_python/models/python_python_publication_response.py +93 -269
  46. pulpcore/client/pulp_python/models/python_python_remote.py +204 -866
  47. pulpcore/client/pulp_python/models/python_python_remote_response.py +198 -839
  48. pulpcore/client/pulp_python/models/python_python_remote_response_hidden_fields_inner.py +90 -0
  49. pulpcore/client/pulp_python/models/python_python_repository.py +96 -250
  50. pulpcore/client/pulp_python/models/python_python_repository_response.py +122 -407
  51. pulpcore/client/pulp_python/models/repair.py +60 -95
  52. pulpcore/client/pulp_python/models/repository_add_remove_content.py +71 -157
  53. pulpcore/client/pulp_python/models/repository_sync_url.py +68 -129
  54. pulpcore/client/pulp_python/models/repository_version_response.py +104 -296
  55. pulpcore/client/pulp_python/models/set_label.py +80 -130
  56. pulpcore/client/pulp_python/models/set_label_response.py +80 -127
  57. pulpcore/client/pulp_python/models/summary_response.py +70 -160
  58. pulpcore/client/pulp_python/models/unset_label.py +75 -107
  59. pulpcore/client/pulp_python/models/unset_label_response.py +78 -129
  60. pulpcore/client/pulp_python/py.typed +0 -0
  61. pulpcore/client/pulp_python/rest.py +136 -170
  62. pulp_python_client-3.12.5.dist-info/METADATA +0 -17
  63. pulp_python_client-3.12.5.dist-info/RECORD +0 -65
  64. pulpcore/client/pulp_python/models/package_upload.py +0 -190
  65. pulpcore/client/pulp_python/models/python_bander_remote.py +0 -184
  66. pulpcore/client/pulp_python/models/python_python_package_content.py +0 -889
  67. pulpcore/client/pulp_python/models/python_python_remote_response_hidden_fields.py +0 -149
  68. {pulp_python_client-3.12.5.dist-info → pulp_python_client-3.13.0.dist-info}/top_level.txt +0 -0
@@ -3,162 +3,336 @@
3
3
  """
4
4
  Pulp 3 API
5
5
 
6
- Fetch, Upload, Organize, and Distribute Software Packages # noqa: E501
6
+ Fetch, Upload, Organize, and Distribute Software Packages
7
7
 
8
8
  The version of the OpenAPI document: v3
9
9
  Contact: pulp-list@redhat.com
10
- Generated by: https://openapi-generator.tech
11
- """
12
-
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
13
11
 
14
- from __future__ import absolute_import
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
15
14
 
16
- import re # noqa: F401
15
+ import warnings
16
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
+ from typing import Any, Dict, List, Optional, Tuple, Union
18
+ from typing_extensions import Annotated
17
19
 
18
- # python 2 and python 3 compatibility library
19
- import six
20
+ from pydantic import Field, StrictStr
21
+ from typing import List, Optional
22
+ from typing_extensions import Annotated
23
+ from pulpcore.client.pulp_python.models.summary_response import SummaryResponse
20
24
 
21
- from pulpcore.client.pulp_python.api_client import ApiClient
22
- from pulpcore.client.pulp_python.exceptions import ( # noqa: F401
23
- ApiTypeError,
24
- ApiValueError
25
- )
25
+ from pulpcore.client.pulp_python.api_client import ApiClient, RequestSerialized
26
+ from pulpcore.client.pulp_python.api_response import ApiResponse
27
+ from pulpcore.client.pulp_python.rest import RESTResponseType
26
28
 
27
29
 
28
- class PypiApi(object):
30
+ class PypiApi:
29
31
  """NOTE: This class is auto generated by OpenAPI Generator
30
32
  Ref: https://openapi-generator.tech
31
33
 
32
34
  Do not edit the class manually.
33
35
  """
34
36
 
35
- def __init__(self, api_client=None):
37
+ def __init__(self, api_client=None) -> None:
36
38
  if api_client is None:
37
- api_client = ApiClient()
39
+ api_client = ApiClient.get_default()
38
40
  self.api_client = api_client
39
41
 
40
- def read(self, path, **kwargs): # noqa: E501
41
- """Get index summary # noqa: E501
42
-
43
- Gets package summary stats of index. # noqa: E501
44
- This method makes a synchronous HTTP request by default. To make an
45
- asynchronous HTTP request, please pass async_req=True
46
- >>> thread = api.read(path, async_req=True)
47
- >>> result = thread.get()
48
-
49
- :param async_req bool: execute request asynchronously
50
- :param str path: (required)
51
- :param list[str] fields: A list of fields to include in the response.
52
- :param list[str] exclude_fields: A list of fields to exclude from the response.
53
- :param _preload_content: if False, the urllib3.HTTPResponse object will
54
- be returned without reading/decoding response
55
- data. Default is True.
42
+
43
+ @validate_call
44
+ def read(
45
+ self,
46
+ path: StrictStr,
47
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
48
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
49
+ _request_timeout: Union[
50
+ None,
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Tuple[
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Annotated[StrictFloat, Field(gt=0)]
55
+ ]
56
+ ] = None,
57
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
58
+ _content_type: Optional[StrictStr] = None,
59
+ _headers: Optional[Dict[StrictStr, Any]] = None,
60
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
61
+ ) -> SummaryResponse:
62
+ """Get index summary
63
+
64
+ Gets package summary stats of index.
65
+
66
+ :param path: (required)
67
+ :type path: str
68
+ :param fields: A list of fields to include in the response.
69
+ :type fields: List[str]
70
+ :param exclude_fields: A list of fields to exclude from the response.
71
+ :type exclude_fields: List[str]
56
72
  :param _request_timeout: timeout setting for this request. If one
57
73
  number provided, it will be total request
58
74
  timeout. It can also be a pair (tuple) of
59
75
  (connection, read) timeouts.
60
- :return: SummaryResponse
61
- If the method is called asynchronously,
62
- returns the request thread.
63
- """
64
- kwargs['_return_http_data_only'] = True
65
- return self.read_with_http_info(path, **kwargs) # noqa: E501
66
-
67
- def read_with_http_info(self, path, **kwargs): # noqa: E501
68
- """Get index summary # noqa: E501
69
-
70
- Gets package summary stats of index. # noqa: E501
71
- This method makes a synchronous HTTP request by default. To make an
72
- asynchronous HTTP request, please pass async_req=True
73
- >>> thread = api.read_with_http_info(path, async_req=True)
74
- >>> result = thread.get()
75
-
76
- :param async_req bool: execute request asynchronously
77
- :param str path: (required)
78
- :param list[str] fields: A list of fields to include in the response.
79
- :param list[str] exclude_fields: A list of fields to exclude from the response.
80
- :param _return_http_data_only: response data without head status code
81
- and headers
82
- :param _preload_content: if False, the urllib3.HTTPResponse object will
83
- be returned without reading/decoding response
84
- data. Default is True.
76
+ :type _request_timeout: int, tuple(int, int), optional
77
+ :param _request_auth: set to override the auth_settings for an a single
78
+ request; this effectively ignores the
79
+ authentication in the spec for a single request.
80
+ :type _request_auth: dict, optional
81
+ :param _content_type: force content-type for the request.
82
+ :type _content_type: str, Optional
83
+ :param _headers: set to override the headers for a single
84
+ request; this effectively ignores the headers
85
+ in the spec for a single request.
86
+ :type _headers: dict, optional
87
+ :param _host_index: set to override the host_index for a single
88
+ request; this effectively ignores the host_index
89
+ in the spec for a single request.
90
+ :type _host_index: int, optional
91
+ :return: Returns the result object.
92
+ """ # noqa: E501
93
+
94
+ _param = self._read_serialize(
95
+ path=path,
96
+ fields=fields,
97
+ exclude_fields=exclude_fields,
98
+ _request_auth=_request_auth,
99
+ _content_type=_content_type,
100
+ _headers=_headers,
101
+ _host_index=_host_index
102
+ )
103
+
104
+ _response_types_map: Dict[str, Optional[str]] = {
105
+ '200': "SummaryResponse",
106
+ }
107
+ response_data = self.api_client.call_api(
108
+ *_param,
109
+ _request_timeout=_request_timeout
110
+ )
111
+ response_data.read()
112
+ return self.api_client.response_deserialize(
113
+ response_data=response_data,
114
+ response_types_map=_response_types_map,
115
+ ).data
116
+
117
+
118
+ @validate_call
119
+ def read_with_http_info(
120
+ self,
121
+ path: StrictStr,
122
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
123
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
124
+ _request_timeout: Union[
125
+ None,
126
+ Annotated[StrictFloat, Field(gt=0)],
127
+ Tuple[
128
+ Annotated[StrictFloat, Field(gt=0)],
129
+ Annotated[StrictFloat, Field(gt=0)]
130
+ ]
131
+ ] = None,
132
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
133
+ _content_type: Optional[StrictStr] = None,
134
+ _headers: Optional[Dict[StrictStr, Any]] = None,
135
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
136
+ ) -> ApiResponse[SummaryResponse]:
137
+ """Get index summary
138
+
139
+ Gets package summary stats of index.
140
+
141
+ :param path: (required)
142
+ :type path: str
143
+ :param fields: A list of fields to include in the response.
144
+ :type fields: List[str]
145
+ :param exclude_fields: A list of fields to exclude from the response.
146
+ :type exclude_fields: List[str]
85
147
  :param _request_timeout: timeout setting for this request. If one
86
148
  number provided, it will be total request
87
149
  timeout. It can also be a pair (tuple) of
88
150
  (connection, read) timeouts.
89
- :return: tuple(SummaryResponse, status_code(int), headers(HTTPHeaderDict))
90
- If the method is called asynchronously,
91
- returns the request thread.
92
- """
151
+ :type _request_timeout: int, tuple(int, int), optional
152
+ :param _request_auth: set to override the auth_settings for an a single
153
+ request; this effectively ignores the
154
+ authentication in the spec for a single request.
155
+ :type _request_auth: dict, optional
156
+ :param _content_type: force content-type for the request.
157
+ :type _content_type: str, Optional
158
+ :param _headers: set to override the headers for a single
159
+ request; this effectively ignores the headers
160
+ in the spec for a single request.
161
+ :type _headers: dict, optional
162
+ :param _host_index: set to override the host_index for a single
163
+ request; this effectively ignores the host_index
164
+ in the spec for a single request.
165
+ :type _host_index: int, optional
166
+ :return: Returns the result object.
167
+ """ # noqa: E501
93
168
 
94
- local_var_params = locals()
169
+ _param = self._read_serialize(
170
+ path=path,
171
+ fields=fields,
172
+ exclude_fields=exclude_fields,
173
+ _request_auth=_request_auth,
174
+ _content_type=_content_type,
175
+ _headers=_headers,
176
+ _host_index=_host_index
177
+ )
95
178
 
96
- all_params = [
97
- 'path',
98
- 'fields',
99
- 'exclude_fields'
100
- ]
101
- all_params.extend(
102
- [
103
- 'async_req',
104
- '_return_http_data_only',
105
- '_preload_content',
106
- '_request_timeout'
179
+ _response_types_map: Dict[str, Optional[str]] = {
180
+ '200': "SummaryResponse",
181
+ }
182
+ response_data = self.api_client.call_api(
183
+ *_param,
184
+ _request_timeout=_request_timeout
185
+ )
186
+ response_data.read()
187
+ return self.api_client.response_deserialize(
188
+ response_data=response_data,
189
+ response_types_map=_response_types_map,
190
+ )
191
+
192
+
193
+ @validate_call
194
+ def read_without_preload_content(
195
+ self,
196
+ path: StrictStr,
197
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
198
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
199
+ _request_timeout: Union[
200
+ None,
201
+ Annotated[StrictFloat, Field(gt=0)],
202
+ Tuple[
203
+ Annotated[StrictFloat, Field(gt=0)],
204
+ Annotated[StrictFloat, Field(gt=0)]
107
205
  ]
206
+ ] = None,
207
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
208
+ _content_type: Optional[StrictStr] = None,
209
+ _headers: Optional[Dict[StrictStr, Any]] = None,
210
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
211
+ ) -> RESTResponseType:
212
+ """Get index summary
213
+
214
+ Gets package summary stats of index.
215
+
216
+ :param path: (required)
217
+ :type path: str
218
+ :param fields: A list of fields to include in the response.
219
+ :type fields: List[str]
220
+ :param exclude_fields: A list of fields to exclude from the response.
221
+ :type exclude_fields: List[str]
222
+ :param _request_timeout: timeout setting for this request. If one
223
+ number provided, it will be total request
224
+ timeout. It can also be a pair (tuple) of
225
+ (connection, read) timeouts.
226
+ :type _request_timeout: int, tuple(int, int), optional
227
+ :param _request_auth: set to override the auth_settings for an a single
228
+ request; this effectively ignores the
229
+ authentication in the spec for a single request.
230
+ :type _request_auth: dict, optional
231
+ :param _content_type: force content-type for the request.
232
+ :type _content_type: str, Optional
233
+ :param _headers: set to override the headers for a single
234
+ request; this effectively ignores the headers
235
+ in the spec for a single request.
236
+ :type _headers: dict, optional
237
+ :param _host_index: set to override the host_index for a single
238
+ request; this effectively ignores the host_index
239
+ in the spec for a single request.
240
+ :type _host_index: int, optional
241
+ :return: Returns the result object.
242
+ """ # noqa: E501
243
+
244
+ _param = self._read_serialize(
245
+ path=path,
246
+ fields=fields,
247
+ exclude_fields=exclude_fields,
248
+ _request_auth=_request_auth,
249
+ _content_type=_content_type,
250
+ _headers=_headers,
251
+ _host_index=_host_index
252
+ )
253
+
254
+ _response_types_map: Dict[str, Optional[str]] = {
255
+ '200': "SummaryResponse",
256
+ }
257
+ response_data = self.api_client.call_api(
258
+ *_param,
259
+ _request_timeout=_request_timeout
260
+ )
261
+ return response_data.response
262
+
263
+
264
+ def _read_serialize(
265
+ self,
266
+ path,
267
+ fields,
268
+ exclude_fields,
269
+ _request_auth,
270
+ _content_type,
271
+ _headers,
272
+ _host_index,
273
+ ) -> RequestSerialized:
274
+
275
+ _host = None
276
+
277
+ _collection_formats: Dict[str, str] = {
278
+ 'fields': 'multi',
279
+ 'exclude_fields': 'multi',
280
+ }
281
+
282
+ _path_params: Dict[str, str] = {}
283
+ _query_params: List[Tuple[str, str]] = []
284
+ _header_params: Dict[str, Optional[str]] = _headers or {}
285
+ _form_params: List[Tuple[str, str]] = []
286
+ _files: Dict[
287
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
288
+ ] = {}
289
+ _body_params: Optional[bytes] = None
290
+
291
+ # process the path parameters
292
+ if path is not None:
293
+ _path_params['path'] = path
294
+ # process the query parameters
295
+ if fields is not None:
296
+
297
+ _query_params.append(('fields', fields))
298
+
299
+ if exclude_fields is not None:
300
+
301
+ _query_params.append(('exclude_fields', exclude_fields))
302
+
303
+ # process the header parameters
304
+ # process the form parameters
305
+ # process the body parameter
306
+
307
+
308
+ # set the HTTP header `Accept`
309
+ if 'Accept' not in _header_params:
310
+ _header_params['Accept'] = self.api_client.select_header_accept(
311
+ [
312
+ 'application/json'
313
+ ]
314
+ )
315
+
316
+
317
+ # authentication setting
318
+ _auth_settings: List[str] = [
319
+ 'basicAuth',
320
+ 'cookieAuth'
321
+ ]
322
+
323
+ return self.api_client.param_serialize(
324
+ method='GET',
325
+ resource_path='/pypi/{path}/',
326
+ path_params=_path_params,
327
+ query_params=_query_params,
328
+ header_params=_header_params,
329
+ body=_body_params,
330
+ post_params=_form_params,
331
+ files=_files,
332
+ auth_settings=_auth_settings,
333
+ collection_formats=_collection_formats,
334
+ _host=_host,
335
+ _request_auth=_request_auth
108
336
  )
109
337
 
110
- for key, val in six.iteritems(local_var_params['kwargs']):
111
- if key not in all_params:
112
- raise ApiTypeError(
113
- "Got an unexpected keyword argument '%s'"
114
- " to method read" % key
115
- )
116
- local_var_params[key] = val
117
- del local_var_params['kwargs']
118
- # verify the required parameter 'path' is set
119
- if self.api_client.client_side_validation and ('path' not in local_var_params or # noqa: E501
120
- local_var_params['path'] is None): # noqa: E501
121
- raise ApiValueError("Missing the required parameter `path` when calling `read`") # noqa: E501
122
-
123
- collection_formats = {}
124
-
125
- path_params = {}
126
- if 'path' in local_var_params:
127
- path_params['path'] = local_var_params['path'] # noqa: E501
128
-
129
- query_params = []
130
- if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
131
- query_params.append(('fields', local_var_params['fields'])) # noqa: E501
132
- collection_formats['fields'] = 'multi' # noqa: E501
133
- if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
134
- query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
135
- collection_formats['exclude_fields'] = 'multi' # noqa: E501
136
-
137
- header_params = {}
138
-
139
- form_params = []
140
- local_var_files = {}
141
-
142
- body_params = None
143
- # HTTP header `Accept`
144
- header_params['Accept'] = self.api_client.select_header_accept(
145
- ['application/json']) # noqa: E501
146
-
147
- # Authentication setting
148
- auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
149
-
150
- return self.api_client.call_api(
151
- '/pypi/{path}/', 'GET',
152
- path_params,
153
- query_params,
154
- header_params,
155
- body=body_params,
156
- post_params=form_params,
157
- files=local_var_files,
158
- response_type='SummaryResponse', # noqa: E501
159
- auth_settings=auth_settings,
160
- async_req=local_var_params.get('async_req'),
161
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
162
- _preload_content=local_var_params.get('_preload_content', True),
163
- _request_timeout=local_var_params.get('_request_timeout'),
164
- collection_formats=collection_formats)
338
+