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
@@ -0,0 +1,90 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pulp 3 API
5
+
6
+ Fetch, Upload, Organize, and Distribute Software Packages
7
+
8
+ The version of the OpenAPI document: v3
9
+ Contact: pulp-list@redhat.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class PythonPythonRemoteResponseHiddenFieldsInner(BaseModel):
27
+ """
28
+ PythonPythonRemoteResponseHiddenFieldsInner
29
+ """ # noqa: E501
30
+ name: StrictStr
31
+ is_set: StrictBool
32
+ __properties: ClassVar[List[str]] = ["name", "is_set"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of PythonPythonRemoteResponseHiddenFieldsInner from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
57
+
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
60
+
61
+ * `None` is only added to the output dict for nullable fields that
62
+ were set at model initialization. Other fields with value `None`
63
+ are ignored.
64
+ """
65
+ excluded_fields: Set[str] = set([
66
+ ])
67
+
68
+ _dict = self.model_dump(
69
+ by_alias=True,
70
+ exclude=excluded_fields,
71
+ exclude_none=True,
72
+ )
73
+ return _dict
74
+
75
+ @classmethod
76
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
77
+ """Create an instance of PythonPythonRemoteResponseHiddenFieldsInner from a dict"""
78
+ if obj is None:
79
+ return None
80
+
81
+ if not isinstance(obj, dict):
82
+ return cls.model_validate(obj)
83
+
84
+ _obj = cls.model_validate({
85
+ "name": obj.get("name"),
86
+ "is_set": obj.get("is_set")
87
+ })
88
+ return _obj
89
+
90
+
@@ -3,266 +3,112 @@
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
- """
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
12
14
 
13
15
 
16
+ from __future__ import annotations
14
17
  import pprint
15
18
  import re # noqa: F401
19
+ import json
16
20
 
17
- import six
18
-
19
- from pulpcore.client.pulp_python.configuration import Configuration
20
-
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing_extensions import Annotated
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
21
26
 
22
- class PythonPythonRepository(object):
23
- """NOTE: This class is auto generated by OpenAPI Generator.
24
- Ref: https://openapi-generator.tech
25
-
26
- Do not edit the class manually.
27
- """
28
-
29
- """
30
- Attributes:
31
- openapi_types (dict): The key is attribute name
32
- and the value is attribute type.
33
- attribute_map (dict): The key is attribute name
34
- and the value is json key in definition.
27
+ class PythonPythonRepository(BaseModel):
35
28
  """
36
- openapi_types = {
37
- 'pulp_labels': 'dict(str, str)',
38
- 'name': 'str',
39
- 'description': 'str',
40
- 'retain_repo_versions': 'int',
41
- 'remote': 'str',
42
- 'autopublish': 'bool'
43
- }
44
-
45
- attribute_map = {
46
- 'pulp_labels': 'pulp_labels',
47
- 'name': 'name',
48
- 'description': 'description',
49
- 'retain_repo_versions': 'retain_repo_versions',
50
- 'remote': 'remote',
51
- 'autopublish': 'autopublish'
52
- }
53
-
54
- def __init__(self, pulp_labels=None, name=None, description=None, retain_repo_versions=None, remote=None, autopublish=False, local_vars_configuration=None): # noqa: E501
55
- """PythonPythonRepository - a model defined in OpenAPI""" # noqa: E501
56
- if local_vars_configuration is None:
57
- local_vars_configuration = Configuration()
58
- self.local_vars_configuration = local_vars_configuration
59
-
60
- self._pulp_labels = None
61
- self._name = None
62
- self._description = None
63
- self._retain_repo_versions = None
64
- self._remote = None
65
- self._autopublish = None
66
- self.discriminator = None
67
-
68
- if pulp_labels is not None:
69
- self.pulp_labels = pulp_labels
70
- self.name = name
71
- self.description = description
72
- self.retain_repo_versions = retain_repo_versions
73
- self.remote = remote
74
- if autopublish is not None:
75
- self.autopublish = autopublish
76
-
77
- @property
78
- def pulp_labels(self):
79
- """Gets the pulp_labels of this PythonPythonRepository. # noqa: E501
80
-
81
-
82
- :return: The pulp_labels of this PythonPythonRepository. # noqa: E501
83
- :rtype: dict(str, str)
84
- """
85
- return self._pulp_labels
86
-
87
- @pulp_labels.setter
88
- def pulp_labels(self, pulp_labels):
89
- """Sets the pulp_labels of this PythonPythonRepository.
90
-
91
-
92
- :param pulp_labels: The pulp_labels of this PythonPythonRepository. # noqa: E501
93
- :type: dict(str, str)
94
- """
95
-
96
- self._pulp_labels = pulp_labels
97
-
98
- @property
99
- def name(self):
100
- """Gets the name of this PythonPythonRepository. # noqa: E501
101
-
102
- A unique name for this repository. # noqa: E501
103
-
104
- :return: The name of this PythonPythonRepository. # noqa: E501
105
- :rtype: str
106
- """
107
- return self._name
108
-
109
- @name.setter
110
- def name(self, name):
111
- """Sets the name of this PythonPythonRepository.
112
-
113
- A unique name for this repository. # noqa: E501
114
-
115
- :param name: The name of this PythonPythonRepository. # noqa: E501
116
- :type: str
117
- """
118
- if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
119
- raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
120
- if (self.local_vars_configuration.client_side_validation and
121
- name is not None and len(name) < 1):
122
- raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`") # noqa: E501
123
-
124
- self._name = name
125
-
126
- @property
127
- def description(self):
128
- """Gets the description of this PythonPythonRepository. # noqa: E501
129
-
130
- An optional description. # noqa: E501
131
-
132
- :return: The description of this PythonPythonRepository. # noqa: E501
133
- :rtype: str
134
- """
135
- return self._description
136
-
137
- @description.setter
138
- def description(self, description):
139
- """Sets the description of this PythonPythonRepository.
140
-
141
- An optional description. # noqa: E501
142
-
143
- :param description: The description of this PythonPythonRepository. # noqa: E501
144
- :type: str
145
- """
146
- if (self.local_vars_configuration.client_side_validation and
147
- description is not None and len(description) < 1):
148
- raise ValueError("Invalid value for `description`, length must be greater than or equal to `1`") # noqa: E501
149
-
150
- self._description = description
151
-
152
- @property
153
- def retain_repo_versions(self):
154
- """Gets the retain_repo_versions of this PythonPythonRepository. # noqa: E501
155
-
156
- Retain X versions of the repository. Default is null which retains all versions. # noqa: E501
157
-
158
- :return: The retain_repo_versions of this PythonPythonRepository. # noqa: E501
159
- :rtype: int
29
+ Serializer for Python Repositories.
30
+ """ # noqa: E501
31
+ pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
32
+ name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="A unique name for this repository.")
33
+ description: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="An optional description.")
34
+ retain_repo_versions: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Retain X versions of the repository. Default is null which retains all versions.")
35
+ remote: Optional[StrictStr] = Field(default=None, description="An optional remote to use by default when syncing.")
36
+ autopublish: Optional[StrictBool] = Field(default=False, description="Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository.")
37
+ __properties: ClassVar[List[str]] = ["pulp_labels", "name", "description", "retain_repo_versions", "remote", "autopublish"]
38
+
39
+ model_config = ConfigDict(
40
+ populate_by_name=True,
41
+ validate_assignment=True,
42
+ protected_namespaces=(),
43
+ )
44
+
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.model_dump(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
53
+ return json.dumps(self.to_dict())
54
+
55
+ @classmethod
56
+ def from_json(cls, json_str: str) -> Optional[Self]:
57
+ """Create an instance of PythonPythonRepository from a JSON string"""
58
+ return cls.from_dict(json.loads(json_str))
59
+
60
+ def to_dict(self) -> Dict[str, Any]:
61
+ """Return the dictionary representation of the model using alias.
62
+
63
+ This has the following differences from calling pydantic's
64
+ `self.model_dump(by_alias=True)`:
65
+
66
+ * `None` is only added to the output dict for nullable fields that
67
+ were set at model initialization. Other fields with value `None`
68
+ are ignored.
160
69
  """
161
- return self._retain_repo_versions
162
-
163
- @retain_repo_versions.setter
164
- def retain_repo_versions(self, retain_repo_versions):
165
- """Sets the retain_repo_versions of this PythonPythonRepository.
166
-
167
- Retain X versions of the repository. Default is null which retains all versions. # noqa: E501
168
-
169
- :param retain_repo_versions: The retain_repo_versions of this PythonPythonRepository. # noqa: E501
170
- :type: int
171
- """
172
- if (self.local_vars_configuration.client_side_validation and
173
- retain_repo_versions is not None and retain_repo_versions < 1): # noqa: E501
174
- raise ValueError("Invalid value for `retain_repo_versions`, must be a value greater than or equal to `1`") # noqa: E501
175
-
176
- self._retain_repo_versions = retain_repo_versions
177
-
178
- @property
179
- def remote(self):
180
- """Gets the remote of this PythonPythonRepository. # noqa: E501
181
-
182
- An optional remote to use by default when syncing. # noqa: E501
183
-
184
- :return: The remote of this PythonPythonRepository. # noqa: E501
185
- :rtype: str
186
- """
187
- return self._remote
188
-
189
- @remote.setter
190
- def remote(self, remote):
191
- """Sets the remote of this PythonPythonRepository.
192
-
193
- An optional remote to use by default when syncing. # noqa: E501
194
-
195
- :param remote: The remote of this PythonPythonRepository. # noqa: E501
196
- :type: str
197
- """
198
-
199
- self._remote = remote
200
-
201
- @property
202
- def autopublish(self):
203
- """Gets the autopublish of this PythonPythonRepository. # noqa: E501
204
-
205
- Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository. # noqa: E501
206
-
207
- :return: The autopublish of this PythonPythonRepository. # noqa: E501
208
- :rtype: bool
209
- """
210
- return self._autopublish
211
-
212
- @autopublish.setter
213
- def autopublish(self, autopublish):
214
- """Sets the autopublish of this PythonPythonRepository.
215
-
216
- Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository. # noqa: E501
217
-
218
- :param autopublish: The autopublish of this PythonPythonRepository. # noqa: E501
219
- :type: bool
220
- """
221
-
222
- self._autopublish = autopublish
223
-
224
- def to_dict(self):
225
- """Returns the model properties as a dict"""
226
- result = {}
227
-
228
- for attr, _ in six.iteritems(self.openapi_types):
229
- value = getattr(self, attr)
230
- if isinstance(value, list):
231
- result[attr] = list(map(
232
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
233
- value
234
- ))
235
- elif hasattr(value, "to_dict"):
236
- result[attr] = value.to_dict()
237
- elif isinstance(value, dict):
238
- result[attr] = dict(map(
239
- lambda item: (item[0], item[1].to_dict())
240
- if hasattr(item[1], "to_dict") else item,
241
- value.items()
242
- ))
243
- else:
244
- result[attr] = value
245
-
246
- return result
247
-
248
- def to_str(self):
249
- """Returns the string representation of the model"""
250
- return pprint.pformat(self.to_dict())
251
-
252
- def __repr__(self):
253
- """For `print` and `pprint`"""
254
- return self.to_str()
255
-
256
- def __eq__(self, other):
257
- """Returns true if both objects are equal"""
258
- if not isinstance(other, PythonPythonRepository):
259
- return False
260
-
261
- return self.to_dict() == other.to_dict()
70
+ excluded_fields: Set[str] = set([
71
+ ])
72
+
73
+ _dict = self.model_dump(
74
+ by_alias=True,
75
+ exclude=excluded_fields,
76
+ exclude_none=True,
77
+ )
78
+ # set to None if description (nullable) is None
79
+ # and model_fields_set contains the field
80
+ if self.description is None and "description" in self.model_fields_set:
81
+ _dict['description'] = None
82
+
83
+ # set to None if retain_repo_versions (nullable) is None
84
+ # and model_fields_set contains the field
85
+ if self.retain_repo_versions is None and "retain_repo_versions" in self.model_fields_set:
86
+ _dict['retain_repo_versions'] = None
87
+
88
+ # set to None if remote (nullable) is None
89
+ # and model_fields_set contains the field
90
+ if self.remote is None and "remote" in self.model_fields_set:
91
+ _dict['remote'] = None
92
+
93
+ return _dict
94
+
95
+ @classmethod
96
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
97
+ """Create an instance of PythonPythonRepository from a dict"""
98
+ if obj is None:
99
+ return None
100
+
101
+ if not isinstance(obj, dict):
102
+ return cls.model_validate(obj)
103
+
104
+ _obj = cls.model_validate({
105
+ "pulp_labels": obj.get("pulp_labels"),
106
+ "name": obj.get("name"),
107
+ "description": obj.get("description"),
108
+ "retain_repo_versions": obj.get("retain_repo_versions"),
109
+ "remote": obj.get("remote"),
110
+ "autopublish": obj.get("autopublish") if obj.get("autopublish") is not None else False
111
+ })
112
+ return _obj
262
113
 
263
- def __ne__(self, other):
264
- """Returns true if both objects are not equal"""
265
- if not isinstance(other, PythonPythonRepository):
266
- return True
267
114
 
268
- return self.to_dict() != other.to_dict()