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,172 +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, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
20
25
 
21
-
22
- class NestedRoleResponse(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 NestedRoleResponse(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
- 'users': 'list[str]',
38
- 'groups': 'list[str]',
39
- 'role': 'str'
40
- }
41
-
42
- attribute_map = {
43
- 'users': 'users',
44
- 'groups': 'groups',
45
- 'role': 'role'
46
- }
47
-
48
- def __init__(self, users=[], groups=[], role=None, local_vars_configuration=None): # noqa: E501
49
- """NestedRoleResponse - 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._users = None
55
- self._groups = None
56
- self._role = None
57
- self.discriminator = None
58
-
59
- if users is not None:
60
- self.users = users
61
- if groups is not None:
62
- self.groups = groups
63
- self.role = role
64
-
65
- @property
66
- def users(self):
67
- """Gets the users of this NestedRoleResponse. # noqa: E501
68
-
69
-
70
- :return: The users of this NestedRoleResponse. # noqa: E501
71
- :rtype: list[str]
72
- """
73
- return self._users
74
-
75
- @users.setter
76
- def users(self, users):
77
- """Sets the users of this NestedRoleResponse.
78
-
79
-
80
- :param users: The users of this NestedRoleResponse. # noqa: E501
81
- :type: list[str]
28
+ Serializer to add/remove object roles to/from users/groups. This is used in conjunction with ``pulpcore.app.viewsets.base.RolesMixin`` and requires the underlying object to be passed as ``content_object`` in the context.
29
+ """ # noqa: E501
30
+ users: Optional[List[StrictStr]] = None
31
+ groups: Optional[List[StrictStr]] = None
32
+ role: StrictStr
33
+ __properties: ClassVar[List[str]] = ["users", "groups", "role"]
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 NestedRoleResponse 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
  """
66
+ excluded_fields: Set[str] = set([
67
+ ])
83
68
 
84
- self._users = users
85
-
86
- @property
87
- def groups(self):
88
- """Gets the groups of this NestedRoleResponse. # noqa: E501
69
+ _dict = self.model_dump(
70
+ by_alias=True,
71
+ exclude=excluded_fields,
72
+ exclude_none=True,
73
+ )
74
+ return _dict
89
75
 
76
+ @classmethod
77
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
78
+ """Create an instance of NestedRoleResponse from a dict"""
79
+ if obj is None:
80
+ return None
90
81
 
91
- :return: The groups of this NestedRoleResponse. # noqa: E501
92
- :rtype: list[str]
93
- """
94
- return self._groups
95
-
96
- @groups.setter
97
- def groups(self, groups):
98
- """Sets the groups of this NestedRoleResponse.
99
-
100
-
101
- :param groups: The groups of this NestedRoleResponse. # noqa: E501
102
- :type: list[str]
103
- """
82
+ if not isinstance(obj, dict):
83
+ return cls.model_validate(obj)
104
84
 
105
- self._groups = groups
85
+ _obj = cls.model_validate({
86
+ "users": obj.get("users"),
87
+ "groups": obj.get("groups"),
88
+ "role": obj.get("role")
89
+ })
90
+ return _obj
106
91
 
107
- @property
108
- def role(self):
109
- """Gets the role of this NestedRoleResponse. # noqa: E501
110
92
 
111
-
112
- :return: The role of this NestedRoleResponse. # noqa: E501
113
- :rtype: str
114
- """
115
- return self._role
116
-
117
- @role.setter
118
- def role(self, role):
119
- """Sets the role of this NestedRoleResponse.
120
-
121
-
122
- :param role: The role of this NestedRoleResponse. # noqa: E501
123
- :type: str
124
- """
125
- if self.local_vars_configuration.client_side_validation and role is None: # noqa: E501
126
- raise ValueError("Invalid value for `role`, must not be `None`") # noqa: E501
127
-
128
- self._role = role
129
-
130
- def to_dict(self):
131
- """Returns the model properties as a dict"""
132
- result = {}
133
-
134
- for attr, _ in six.iteritems(self.openapi_types):
135
- value = getattr(self, attr)
136
- if isinstance(value, list):
137
- result[attr] = list(map(
138
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
139
- value
140
- ))
141
- elif hasattr(value, "to_dict"):
142
- result[attr] = value.to_dict()
143
- elif isinstance(value, dict):
144
- result[attr] = dict(map(
145
- lambda item: (item[0], item[1].to_dict())
146
- if hasattr(item[1], "to_dict") else item,
147
- value.items()
148
- ))
149
- else:
150
- result[attr] = value
151
-
152
- return result
153
-
154
- def to_str(self):
155
- """Returns the string representation of the model"""
156
- return pprint.pformat(self.to_dict())
157
-
158
- def __repr__(self):
159
- """For `print` and `pprint`"""
160
- return self.to_str()
161
-
162
- def __eq__(self, other):
163
- """Returns true if both objects are equal"""
164
- if not isinstance(other, NestedRoleResponse):
165
- return False
166
-
167
- return self.to_dict() == other.to_dict()
168
-
169
- def __ne__(self, other):
170
- """Returns true if both objects are not equal"""
171
- if not isinstance(other, NestedRoleResponse):
172
- return True
173
-
174
- return self.to_dict() != other.to_dict()
@@ -3,120 +3,94 @@
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 ObjectRolesResponse(object):
23
- """NOTE: This class is auto generated by OpenAPI Generator.
24
- Ref: https://openapi-generator.tech
21
+ from pydantic import BaseModel, ConfigDict
22
+ from typing import Any, ClassVar, Dict, List
23
+ from pulpcore.client.pulp_python.models.nested_role_response import NestedRoleResponse
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
25
26
 
26
- Do not edit the class manually.
27
+ class ObjectRolesResponse(BaseModel):
27
28
  """
29
+ ObjectRolesResponse
30
+ """ # noqa: E501
31
+ roles: List[NestedRoleResponse]
32
+ __properties: ClassVar[List[str]] = ["roles"]
28
33
 
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
- 'roles': 'list[NestedRoleResponse]'
38
- }
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
39
 
40
- attribute_map = {
41
- 'roles': 'roles'
42
- }
43
40
 
44
- def __init__(self, roles=None, local_vars_configuration=None): # noqa: E501
45
- """ObjectRolesResponse - a model defined in OpenAPI""" # noqa: E501
46
- if local_vars_configuration is None:
47
- local_vars_configuration = Configuration()
48
- self.local_vars_configuration = local_vars_configuration
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))
49
44
 
50
- self._roles = None
51
- self.discriminator = None
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())
52
49
 
53
- self.roles = roles
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of ObjectRolesResponse from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
54
 
55
- @property
56
- def roles(self):
57
- """Gets the roles of this ObjectRolesResponse. # noqa: E501
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
58
57
 
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
59
60
 
60
- :return: The roles of this ObjectRolesResponse. # noqa: E501
61
- :rtype: list[NestedRoleResponse]
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.
62
64
  """
63
- return self._roles
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
+ # override the default output from pydantic by calling `to_dict()` of each item in roles (list)
74
+ _items = []
75
+ if self.roles:
76
+ for _item_roles in self.roles:
77
+ if _item_roles:
78
+ _items.append(_item_roles.to_dict())
79
+ _dict['roles'] = _items
80
+ return _dict
81
+
82
+ @classmethod
83
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
84
+ """Create an instance of ObjectRolesResponse from a dict"""
85
+ if obj is None:
86
+ return None
87
+
88
+ if not isinstance(obj, dict):
89
+ return cls.model_validate(obj)
90
+
91
+ _obj = cls.model_validate({
92
+ "roles": [NestedRoleResponse.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None
93
+ })
94
+ return _obj
64
95
 
65
- @roles.setter
66
- def roles(self, roles):
67
- """Sets the roles of this ObjectRolesResponse.
68
96
 
69
-
70
- :param roles: The roles of this ObjectRolesResponse. # noqa: E501
71
- :type: list[NestedRoleResponse]
72
- """
73
- if self.local_vars_configuration.client_side_validation and roles is None: # noqa: E501
74
- raise ValueError("Invalid value for `roles`, must not be `None`") # noqa: E501
75
-
76
- self._roles = roles
77
-
78
- def to_dict(self):
79
- """Returns the model properties as a dict"""
80
- result = {}
81
-
82
- for attr, _ in six.iteritems(self.openapi_types):
83
- value = getattr(self, attr)
84
- if isinstance(value, list):
85
- result[attr] = list(map(
86
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
87
- value
88
- ))
89
- elif hasattr(value, "to_dict"):
90
- result[attr] = value.to_dict()
91
- elif isinstance(value, dict):
92
- result[attr] = dict(map(
93
- lambda item: (item[0], item[1].to_dict())
94
- if hasattr(item[1], "to_dict") else item,
95
- value.items()
96
- ))
97
- else:
98
- result[attr] = value
99
-
100
- return result
101
-
102
- def to_str(self):
103
- """Returns the string representation of the model"""
104
- return pprint.pformat(self.to_dict())
105
-
106
- def __repr__(self):
107
- """For `print` and `pprint`"""
108
- return self.to_str()
109
-
110
- def __eq__(self, other):
111
- """Returns true if both objects are equal"""
112
- if not isinstance(other, ObjectRolesResponse):
113
- return False
114
-
115
- return self.to_dict() == other.to_dict()
116
-
117
- def __ne__(self, other):
118
- """Returns true if both objects are not equal"""
119
- if not isinstance(other, ObjectRolesResponse):
120
- return True
121
-
122
- return self.to_dict() != other.to_dict()