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

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.1.dist-info/METADATA +17 -0
  2. pulp_python_client-3.13.1.dist-info/RECORD +64 -0
  3. {pulp_python_client-3.12.5.dist-info → pulp_python_client-3.13.1.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.1.dist-info}/top_level.txt +0 -0
@@ -3,265 +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 PatchedpythonPythonRepository(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 PatchedpythonPythonRepository(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
- """PatchedpythonPythonRepository - 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
- if name is not None:
71
- self.name = name
72
- self.description = description
73
- self.retain_repo_versions = retain_repo_versions
74
- self.remote = remote
75
- if autopublish is not None:
76
- self.autopublish = autopublish
77
-
78
- @property
79
- def pulp_labels(self):
80
- """Gets the pulp_labels of this PatchedpythonPythonRepository. # noqa: E501
81
-
82
-
83
- :return: The pulp_labels of this PatchedpythonPythonRepository. # noqa: E501
84
- :rtype: dict(str, str)
85
- """
86
- return self._pulp_labels
87
-
88
- @pulp_labels.setter
89
- def pulp_labels(self, pulp_labels):
90
- """Sets the pulp_labels of this PatchedpythonPythonRepository.
91
-
92
-
93
- :param pulp_labels: The pulp_labels of this PatchedpythonPythonRepository. # noqa: E501
94
- :type: dict(str, str)
95
- """
96
-
97
- self._pulp_labels = pulp_labels
98
-
99
- @property
100
- def name(self):
101
- """Gets the name of this PatchedpythonPythonRepository. # noqa: E501
102
-
103
- A unique name for this repository. # noqa: E501
104
-
105
- :return: The name of this PatchedpythonPythonRepository. # noqa: E501
106
- :rtype: str
107
- """
108
- return self._name
109
-
110
- @name.setter
111
- def name(self, name):
112
- """Sets the name of this PatchedpythonPythonRepository.
113
-
114
- A unique name for this repository. # noqa: E501
115
-
116
- :param name: The name of this PatchedpythonPythonRepository. # noqa: E501
117
- :type: str
118
- """
119
- if (self.local_vars_configuration.client_side_validation and
120
- name is not None and len(name) < 1):
121
- raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`") # noqa: E501
122
-
123
- self._name = name
124
-
125
- @property
126
- def description(self):
127
- """Gets the description of this PatchedpythonPythonRepository. # noqa: E501
128
-
129
- An optional description. # noqa: E501
130
-
131
- :return: The description of this PatchedpythonPythonRepository. # noqa: E501
132
- :rtype: str
133
- """
134
- return self._description
135
-
136
- @description.setter
137
- def description(self, description):
138
- """Sets the description of this PatchedpythonPythonRepository.
139
-
140
- An optional description. # noqa: E501
141
-
142
- :param description: The description of this PatchedpythonPythonRepository. # noqa: E501
143
- :type: str
144
- """
145
- if (self.local_vars_configuration.client_side_validation and
146
- description is not None and len(description) < 1):
147
- raise ValueError("Invalid value for `description`, length must be greater than or equal to `1`") # noqa: E501
148
-
149
- self._description = description
150
-
151
- @property
152
- def retain_repo_versions(self):
153
- """Gets the retain_repo_versions of this PatchedpythonPythonRepository. # noqa: E501
154
-
155
- Retain X versions of the repository. Default is null which retains all versions. # noqa: E501
156
-
157
- :return: The retain_repo_versions of this PatchedpythonPythonRepository. # noqa: E501
158
- :rtype: int
29
+ Serializer for Python Repositories.
30
+ """ # noqa: E501
31
+ pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
32
+ name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, 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 PatchedpythonPythonRepository 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.
159
69
  """
160
- return self._retain_repo_versions
161
-
162
- @retain_repo_versions.setter
163
- def retain_repo_versions(self, retain_repo_versions):
164
- """Sets the retain_repo_versions of this PatchedpythonPythonRepository.
165
-
166
- Retain X versions of the repository. Default is null which retains all versions. # noqa: E501
167
-
168
- :param retain_repo_versions: The retain_repo_versions of this PatchedpythonPythonRepository. # noqa: E501
169
- :type: int
170
- """
171
- if (self.local_vars_configuration.client_side_validation and
172
- retain_repo_versions is not None and retain_repo_versions < 1): # noqa: E501
173
- raise ValueError("Invalid value for `retain_repo_versions`, must be a value greater than or equal to `1`") # noqa: E501
174
-
175
- self._retain_repo_versions = retain_repo_versions
176
-
177
- @property
178
- def remote(self):
179
- """Gets the remote of this PatchedpythonPythonRepository. # noqa: E501
180
-
181
- An optional remote to use by default when syncing. # noqa: E501
182
-
183
- :return: The remote of this PatchedpythonPythonRepository. # noqa: E501
184
- :rtype: str
185
- """
186
- return self._remote
187
-
188
- @remote.setter
189
- def remote(self, remote):
190
- """Sets the remote of this PatchedpythonPythonRepository.
191
-
192
- An optional remote to use by default when syncing. # noqa: E501
193
-
194
- :param remote: The remote of this PatchedpythonPythonRepository. # noqa: E501
195
- :type: str
196
- """
197
-
198
- self._remote = remote
199
-
200
- @property
201
- def autopublish(self):
202
- """Gets the autopublish of this PatchedpythonPythonRepository. # noqa: E501
203
-
204
- Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository. # noqa: E501
205
-
206
- :return: The autopublish of this PatchedpythonPythonRepository. # noqa: E501
207
- :rtype: bool
208
- """
209
- return self._autopublish
210
-
211
- @autopublish.setter
212
- def autopublish(self, autopublish):
213
- """Sets the autopublish of this PatchedpythonPythonRepository.
214
-
215
- Whether to automatically create publications for new repository versions, and update any distributions pointing to this repository. # noqa: E501
216
-
217
- :param autopublish: The autopublish of this PatchedpythonPythonRepository. # noqa: E501
218
- :type: bool
219
- """
220
-
221
- self._autopublish = autopublish
222
-
223
- def to_dict(self):
224
- """Returns the model properties as a dict"""
225
- result = {}
226
-
227
- for attr, _ in six.iteritems(self.openapi_types):
228
- value = getattr(self, attr)
229
- if isinstance(value, list):
230
- result[attr] = list(map(
231
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
232
- value
233
- ))
234
- elif hasattr(value, "to_dict"):
235
- result[attr] = value.to_dict()
236
- elif isinstance(value, dict):
237
- result[attr] = dict(map(
238
- lambda item: (item[0], item[1].to_dict())
239
- if hasattr(item[1], "to_dict") else item,
240
- value.items()
241
- ))
242
- else:
243
- result[attr] = value
244
-
245
- return result
246
-
247
- def to_str(self):
248
- """Returns the string representation of the model"""
249
- return pprint.pformat(self.to_dict())
250
-
251
- def __repr__(self):
252
- """For `print` and `pprint`"""
253
- return self.to_str()
254
-
255
- def __eq__(self, other):
256
- """Returns true if both objects are equal"""
257
- if not isinstance(other, PatchedpythonPythonRepository):
258
- return False
259
-
260
- 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 PatchedpythonPythonRepository 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
261
113
 
262
- def __ne__(self, other):
263
- """Returns true if both objects are not equal"""
264
- if not isinstance(other, PatchedpythonPythonRepository):
265
- return True
266
114
 
267
- return self.to_dict() != other.to_dict()
@@ -3,100 +3,37 @@
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
-
13
-
14
- import pprint
15
- import re # noqa: F401
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
16
11
 
17
- import six
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
18
14
 
19
- from pulpcore.client.pulp_python.configuration import Configuration
20
15
 
16
+ from __future__ import annotations
17
+ import json
18
+ from enum import Enum
19
+ from typing_extensions import Self
21
20
 
22
- class PolicyEnum(object):
23
- """NOTE: This class is auto generated by OpenAPI Generator.
24
- Ref: https://openapi-generator.tech
25
21
 
26
- Do not edit the class manually.
22
+ class PolicyEnum(str, Enum):
27
23
  """
28
-
29
- """
30
- allowed enum values
24
+ * `immediate` - When syncing, download all metadata and content now. * `on_demand` - When syncing, download metadata, but do not download content now. Instead, download content as clients request it, and save it in Pulp to be served for future client requests. * `streamed` - When syncing, download metadata, but do not download content now. Instead,download content as clients request it, but never save it in Pulp. This causes future requests for that same content to have to be downloaded again.
31
25
  """
32
- IMMEDIATE = "immediate"
33
- ON_DEMAND = "on_demand"
34
- STREAMED = "streamed"
35
-
36
- allowable_values = [IMMEDIATE, ON_DEMAND, STREAMED] # noqa: E501
37
26
 
38
27
  """
39
- Attributes:
40
- openapi_types (dict): The key is attribute name
41
- and the value is attribute type.
42
- attribute_map (dict): The key is attribute name
43
- and the value is json key in definition.
28
+ allowed enum values
44
29
  """
45
- openapi_types = {
46
- }
47
-
48
- attribute_map = {
49
- }
50
-
51
- def __init__(self, local_vars_configuration=None): # noqa: E501
52
- """PolicyEnum - a model defined in OpenAPI""" # noqa: E501
53
- if local_vars_configuration is None:
54
- local_vars_configuration = Configuration()
55
- self.local_vars_configuration = local_vars_configuration
56
- self.discriminator = None
57
-
58
- def to_dict(self):
59
- """Returns the model properties as a dict"""
60
- result = {}
61
-
62
- for attr, _ in six.iteritems(self.openapi_types):
63
- value = getattr(self, attr)
64
- if isinstance(value, list):
65
- result[attr] = list(map(
66
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
67
- value
68
- ))
69
- elif hasattr(value, "to_dict"):
70
- result[attr] = value.to_dict()
71
- elif isinstance(value, dict):
72
- result[attr] = dict(map(
73
- lambda item: (item[0], item[1].to_dict())
74
- if hasattr(item[1], "to_dict") else item,
75
- value.items()
76
- ))
77
- else:
78
- result[attr] = value
79
-
80
- return result
81
-
82
- def to_str(self):
83
- """Returns the string representation of the model"""
84
- return pprint.pformat(self.to_dict())
85
-
86
- def __repr__(self):
87
- """For `print` and `pprint`"""
88
- return self.to_str()
89
-
90
- def __eq__(self, other):
91
- """Returns true if both objects are equal"""
92
- if not isinstance(other, PolicyEnum):
93
- return False
30
+ IMMEDIATE = 'immediate'
31
+ ON_DEMAND = 'on_demand'
32
+ STREAMED = 'streamed'
94
33
 
95
- return self.to_dict() == other.to_dict()
34
+ @classmethod
35
+ def from_json(cls, json_str: str) -> Self:
36
+ """Create an instance of PolicyEnum from a JSON string"""
37
+ return cls(json.loads(json_str))
96
38
 
97
- def __ne__(self, other):
98
- """Returns true if both objects are not equal"""
99
- if not isinstance(other, PolicyEnum):
100
- return True
101
39
 
102
- return self.to_dict() != other.to_dict()