pulp-python-client 3.12.4__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.4.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.4.dist-info/METADATA +0 -17
  63. pulp_python_client-3.12.4.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.4.dist-info → pulp_python_client-3.13.0.dist-info}/top_level.txt +0 -0
@@ -3,148 +3,101 @@
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
-
22
- class SetLabelResponse(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
- """
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
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
28
26
 
27
+ class SetLabelResponse(BaseModel):
29
28
  """
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.
35
- """
36
- openapi_types = {
37
- 'key': 'str',
38
- 'value': 'str'
39
- }
40
-
41
- attribute_map = {
42
- 'key': 'key',
43
- 'value': 'value'
44
- }
45
-
46
- def __init__(self, key=None, value=None, local_vars_configuration=None): # noqa: E501
47
- """SetLabelResponse - a model defined in OpenAPI""" # noqa: E501
48
- if local_vars_configuration is None:
49
- local_vars_configuration = Configuration()
50
- self.local_vars_configuration = local_vars_configuration
51
-
52
- self._key = None
53
- self._value = None
54
- self.discriminator = None
55
-
56
- self.key = key
57
- self.value = value
58
-
59
- @property
60
- def key(self):
61
- """Gets the key of this SetLabelResponse. # noqa: E501
62
-
63
-
64
- :return: The key of this SetLabelResponse. # noqa: E501
65
- :rtype: str
66
- """
67
- return self._key
68
-
69
- @key.setter
70
- def key(self, key):
71
- """Sets the key of this SetLabelResponse.
72
-
73
-
74
- :param key: The key of this SetLabelResponse. # noqa: E501
75
- :type: str
29
+ Serializer for synchronously setting a label.
30
+ """ # noqa: E501
31
+ key: Annotated[str, Field(strict=True)]
32
+ value: Optional[StrictStr]
33
+ __properties: ClassVar[List[str]] = ["key", "value"]
34
+
35
+ @field_validator('key')
36
+ def key_validate_regular_expression(cls, value):
37
+ """Validates the regular expression"""
38
+ if not re.match(r"^[-a-zA-Z0-9_]+$", value):
39
+ raise ValueError(r"must validate the regular expression /^[-a-zA-Z0-9_]+$/")
40
+ return value
41
+
42
+ model_config = ConfigDict(
43
+ populate_by_name=True,
44
+ validate_assignment=True,
45
+ protected_namespaces=(),
46
+ )
47
+
48
+
49
+ def to_str(self) -> str:
50
+ """Returns the string representation of the model using alias"""
51
+ return pprint.pformat(self.model_dump(by_alias=True))
52
+
53
+ def to_json(self) -> str:
54
+ """Returns the JSON representation of the model using alias"""
55
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
56
+ return json.dumps(self.to_dict())
57
+
58
+ @classmethod
59
+ def from_json(cls, json_str: str) -> Optional[Self]:
60
+ """Create an instance of SetLabelResponse from a JSON string"""
61
+ return cls.from_dict(json.loads(json_str))
62
+
63
+ def to_dict(self) -> Dict[str, Any]:
64
+ """Return the dictionary representation of the model using alias.
65
+
66
+ This has the following differences from calling pydantic's
67
+ `self.model_dump(by_alias=True)`:
68
+
69
+ * `None` is only added to the output dict for nullable fields that
70
+ were set at model initialization. Other fields with value `None`
71
+ are ignored.
76
72
  """
77
- if self.local_vars_configuration.client_side_validation and key is None: # noqa: E501
78
- raise ValueError("Invalid value for `key`, must not be `None`") # noqa: E501
79
- if (self.local_vars_configuration.client_side_validation and
80
- key is not None and not re.search(r'^[-a-zA-Z0-9_]+$', key)): # noqa: E501
81
- raise ValueError(r"Invalid value for `key`, must be a follow pattern or equal to `/^[-a-zA-Z0-9_]+$/`") # noqa: E501
73
+ excluded_fields: Set[str] = set([
74
+ ])
82
75
 
83
- self._key = key
76
+ _dict = self.model_dump(
77
+ by_alias=True,
78
+ exclude=excluded_fields,
79
+ exclude_none=True,
80
+ )
81
+ # set to None if value (nullable) is None
82
+ # and model_fields_set contains the field
83
+ if self.value is None and "value" in self.model_fields_set:
84
+ _dict['value'] = None
84
85
 
85
- @property
86
- def value(self):
87
- """Gets the value of this SetLabelResponse. # noqa: E501
86
+ return _dict
88
87
 
88
+ @classmethod
89
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
90
+ """Create an instance of SetLabelResponse from a dict"""
91
+ if obj is None:
92
+ return None
89
93
 
90
- :return: The value of this SetLabelResponse. # noqa: E501
91
- :rtype: str
92
- """
93
- return self._value
94
-
95
- @value.setter
96
- def value(self, value):
97
- """Sets the value of this SetLabelResponse.
94
+ if not isinstance(obj, dict):
95
+ return cls.model_validate(obj)
98
96
 
97
+ _obj = cls.model_validate({
98
+ "key": obj.get("key"),
99
+ "value": obj.get("value")
100
+ })
101
+ return _obj
99
102
 
100
- :param value: The value of this SetLabelResponse. # noqa: E501
101
- :type: str
102
- """
103
103
 
104
- self._value = value
105
-
106
- def to_dict(self):
107
- """Returns the model properties as a dict"""
108
- result = {}
109
-
110
- for attr, _ in six.iteritems(self.openapi_types):
111
- value = getattr(self, attr)
112
- if isinstance(value, list):
113
- result[attr] = list(map(
114
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
115
- value
116
- ))
117
- elif hasattr(value, "to_dict"):
118
- result[attr] = value.to_dict()
119
- elif isinstance(value, dict):
120
- result[attr] = dict(map(
121
- lambda item: (item[0], item[1].to_dict())
122
- if hasattr(item[1], "to_dict") else item,
123
- value.items()
124
- ))
125
- else:
126
- result[attr] = value
127
-
128
- return result
129
-
130
- def to_str(self):
131
- """Returns the string representation of the model"""
132
- return pprint.pformat(self.to_dict())
133
-
134
- def __repr__(self):
135
- """For `print` and `pprint`"""
136
- return self.to_str()
137
-
138
- def __eq__(self, other):
139
- """Returns true if both objects are equal"""
140
- if not isinstance(other, SetLabelResponse):
141
- return False
142
-
143
- return self.to_dict() == other.to_dict()
144
-
145
- def __ne__(self, other):
146
- """Returns true if both objects are not equal"""
147
- if not isinstance(other, SetLabelResponse):
148
- return True
149
-
150
- return self.to_dict() != other.to_dict()
@@ -3,180 +3,90 @@
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
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
20
25
 
21
-
22
- class SummaryResponse(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.
26
+ class SummaryResponse(BaseModel):
27
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.
35
- """
36
- openapi_types = {
37
- 'projects': 'int',
38
- 'releases': 'int',
39
- 'files': 'int'
40
- }
41
-
42
- attribute_map = {
43
- 'projects': 'projects',
44
- 'releases': 'releases',
45
- 'files': 'files'
46
- }
47
-
48
- def __init__(self, projects=None, releases=None, files=None, local_vars_configuration=None): # noqa: E501
49
- """SummaryResponse - a model defined in OpenAPI""" # noqa: E501
50
- if local_vars_configuration is None:
51
- local_vars_configuration = Configuration()
52
- self.local_vars_configuration = local_vars_configuration
53
-
54
- self._projects = None
55
- self._releases = None
56
- self._files = None
57
- self.discriminator = None
58
-
59
- self.projects = projects
60
- self.releases = releases
61
- self.files = files
62
-
63
- @property
64
- def projects(self):
65
- """Gets the projects of this SummaryResponse. # noqa: E501
66
-
67
- Number of Python projects in index # noqa: E501
68
-
69
- :return: The projects of this SummaryResponse. # noqa: E501
70
- :rtype: int
71
- """
72
- return self._projects
73
-
74
- @projects.setter
75
- def projects(self, projects):
76
- """Sets the projects of this SummaryResponse.
77
-
78
- Number of Python projects in index # noqa: E501
79
-
80
- :param projects: The projects of this SummaryResponse. # noqa: E501
81
- :type: int
28
+ A Serializer for summary information of an index.
29
+ """ # noqa: E501
30
+ projects: StrictInt = Field(description="Number of Python projects in index")
31
+ releases: StrictInt = Field(description="Number of Python distribution releases in index")
32
+ files: StrictInt = Field(description="Number of files for all distributions in index")
33
+ __properties: ClassVar[List[str]] = ["projects", "releases", "files"]
34
+
35
+ model_config = ConfigDict(
36
+ populate_by_name=True,
37
+ validate_assignment=True,
38
+ protected_namespaces=(),
39
+ )
40
+
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
+ return json.dumps(self.to_dict())
50
+
51
+ @classmethod
52
+ def from_json(cls, json_str: str) -> Optional[Self]:
53
+ """Create an instance of SummaryResponse from a JSON string"""
54
+ return cls.from_dict(json.loads(json_str))
55
+
56
+ def to_dict(self) -> Dict[str, Any]:
57
+ """Return the dictionary representation of the model using alias.
58
+
59
+ This has the following differences from calling pydantic's
60
+ `self.model_dump(by_alias=True)`:
61
+
62
+ * `None` is only added to the output dict for nullable fields that
63
+ were set at model initialization. Other fields with value `None`
64
+ are ignored.
82
65
  """
83
- if self.local_vars_configuration.client_side_validation and projects is None: # noqa: E501
84
- raise ValueError("Invalid value for `projects`, must not be `None`") # noqa: E501
85
-
86
- self._projects = projects
66
+ excluded_fields: Set[str] = set([
67
+ ])
87
68
 
88
- @property
89
- def releases(self):
90
- """Gets the releases of this SummaryResponse. # noqa: E501
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ return _dict
91
75
 
92
- Number of Python distribution releases in index # noqa: E501
93
-
94
- :return: The releases of this SummaryResponse. # noqa: E501
95
- :rtype: int
96
- """
97
- return self._releases
76
+ @classmethod
77
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
+ """Create an instance of SummaryResponse from a dict"""
79
+ if obj is None:
80
+ return None
98
81
 
99
- @releases.setter
100
- def releases(self, releases):
101
- """Sets the releases of this SummaryResponse.
102
-
103
- Number of Python distribution releases in index # noqa: E501
104
-
105
- :param releases: The releases of this SummaryResponse. # noqa: E501
106
- :type: int
107
- """
108
- if self.local_vars_configuration.client_side_validation and releases is None: # noqa: E501
109
- raise ValueError("Invalid value for `releases`, must not be `None`") # noqa: E501
82
+ if not isinstance(obj, dict):
83
+ return cls.model_validate(obj)
110
84
 
111
- self._releases = releases
85
+ _obj = cls.model_validate({
86
+ "projects": obj.get("projects"),
87
+ "releases": obj.get("releases"),
88
+ "files": obj.get("files")
89
+ })
90
+ return _obj
112
91
 
113
- @property
114
- def files(self):
115
- """Gets the files of this SummaryResponse. # noqa: E501
116
92
 
117
- Number of files for all distributions in index # noqa: E501
118
-
119
- :return: The files of this SummaryResponse. # noqa: E501
120
- :rtype: int
121
- """
122
- return self._files
123
-
124
- @files.setter
125
- def files(self, files):
126
- """Sets the files of this SummaryResponse.
127
-
128
- Number of files for all distributions in index # noqa: E501
129
-
130
- :param files: The files of this SummaryResponse. # noqa: E501
131
- :type: int
132
- """
133
- if self.local_vars_configuration.client_side_validation and files is None: # noqa: E501
134
- raise ValueError("Invalid value for `files`, must not be `None`") # noqa: E501
135
-
136
- self._files = files
137
-
138
- def to_dict(self):
139
- """Returns the model properties as a dict"""
140
- result = {}
141
-
142
- for attr, _ in six.iteritems(self.openapi_types):
143
- value = getattr(self, attr)
144
- if isinstance(value, list):
145
- result[attr] = list(map(
146
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
147
- value
148
- ))
149
- elif hasattr(value, "to_dict"):
150
- result[attr] = value.to_dict()
151
- elif isinstance(value, dict):
152
- result[attr] = dict(map(
153
- lambda item: (item[0], item[1].to_dict())
154
- if hasattr(item[1], "to_dict") else item,
155
- value.items()
156
- ))
157
- else:
158
- result[attr] = value
159
-
160
- return result
161
-
162
- def to_str(self):
163
- """Returns the string representation of the model"""
164
- return pprint.pformat(self.to_dict())
165
-
166
- def __repr__(self):
167
- """For `print` and `pprint`"""
168
- return self.to_str()
169
-
170
- def __eq__(self, other):
171
- """Returns true if both objects are equal"""
172
- if not isinstance(other, SummaryResponse):
173
- return False
174
-
175
- return self.to_dict() == other.to_dict()
176
-
177
- def __ne__(self, other):
178
- """Returns true if both objects are not equal"""
179
- if not isinstance(other, SummaryResponse):
180
- return True
181
-
182
- return self.to_dict() != other.to_dict()