clear-skies-gitlab 2.0.4__py3-none-any.whl → 2.0.6__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.
Files changed (34) hide show
  1. {clear_skies_gitlab-2.0.4.dist-info → clear_skies_gitlab-2.0.6.dist-info}/METADATA +1 -1
  2. {clear_skies_gitlab-2.0.4.dist-info → clear_skies_gitlab-2.0.6.dist-info}/RECORD +34 -34
  3. clearskies_gitlab/defaults/gitlab_default_auth.py +33 -2
  4. clearskies_gitlab/defaults/gitlab_default_host.py +31 -2
  5. clearskies_gitlab/rest/backends/gitlab_rest_backend.py +98 -80
  6. clearskies_gitlab/rest/gitlab_branch_rule.py +74 -1
  7. clearskies_gitlab/rest/gitlab_cicd_variable.py +78 -1
  8. clearskies_gitlab/rest/gitlab_member.py +80 -1
  9. clearskies_gitlab/rest/models/gitlab_rest_advanced_search.py +67 -1
  10. clearskies_gitlab/rest/models/gitlab_rest_advanced_search_blob.py +72 -1
  11. clearskies_gitlab/rest/models/gitlab_rest_current_user.py +134 -1
  12. clearskies_gitlab/rest/models/gitlab_rest_group.py +60 -1
  13. clearskies_gitlab/rest/models/gitlab_rest_group_access_token.py +102 -1
  14. clearskies_gitlab/rest/models/gitlab_rest_group_base.py +305 -1
  15. clearskies_gitlab/rest/models/gitlab_rest_group_member.py +64 -1
  16. clearskies_gitlab/rest/models/gitlab_rest_group_project.py +27 -1
  17. clearskies_gitlab/rest/models/gitlab_rest_group_search.py +30 -1
  18. clearskies_gitlab/rest/models/gitlab_rest_group_search_blob.py +27 -1
  19. clearskies_gitlab/rest/models/gitlab_rest_group_subgroup.py +54 -17
  20. clearskies_gitlab/rest/models/gitlab_rest_group_variable.py +44 -1
  21. clearskies_gitlab/rest/models/gitlab_rest_namespace.py +178 -1
  22. clearskies_gitlab/rest/models/gitlab_rest_project.py +501 -3
  23. clearskies_gitlab/rest/models/gitlab_rest_project_approval_config.py +90 -2
  24. clearskies_gitlab/rest/models/gitlab_rest_project_approval_rule.py +92 -1
  25. clearskies_gitlab/rest/models/gitlab_rest_project_member.py +62 -1
  26. clearskies_gitlab/rest/models/gitlab_rest_project_protected_branch.py +132 -1
  27. clearskies_gitlab/rest/models/gitlab_rest_project_repository_commit.py +144 -2
  28. clearskies_gitlab/rest/models/gitlab_rest_project_repository_commit_diff.py +89 -2
  29. clearskies_gitlab/rest/models/gitlab_rest_project_repository_contributor.py +68 -2
  30. clearskies_gitlab/rest/models/gitlab_rest_project_repository_file.py +90 -1
  31. clearskies_gitlab/rest/models/gitlab_rest_project_repository_file_raw.py +57 -3
  32. clearskies_gitlab/rest/models/gitlab_rest_project_variable.py +46 -1
  33. {clear_skies_gitlab-2.0.4.dist-info → clear_skies_gitlab-2.0.6.dist-info}/WHEEL +0 -0
  34. {clear_skies_gitlab-2.0.4.dist-info → clear_skies_gitlab-2.0.6.dist-info}/licenses/LICENSE +0 -0
@@ -11,7 +11,45 @@ from clearskies_gitlab.rest.backends import GitlabRestBackend
11
11
  class GitlabRestGroupVariable(
12
12
  gitlab_cicd_variable.GitlabCICDVariable,
13
13
  ):
14
- """Model for gitlab group variables."""
14
+ """
15
+ Model for GitLab group CI/CD variables.
16
+
17
+ This model provides access to the GitLab Group Variables API for managing
18
+ CI/CD variables at the group level. Group variables are available to all
19
+ projects within the group.
20
+
21
+ See https://docs.gitlab.com/api/group_level_variables/ for more details.
22
+
23
+ Example usage:
24
+
25
+ ```python
26
+ from clearskies_gitlab.rest.models import GitlabRestGroupVariable
27
+
28
+
29
+ def my_function(group_variables: GitlabRestGroupVariable):
30
+ # List all variables for a group
31
+ for var in group_variables.where("group_id=123"):
32
+ print(f"Variable: {var.key}")
33
+ print(f"Protected: {var.protected}")
34
+ print(f"Masked: {var.masked}")
35
+
36
+ # Create a new variable
37
+ new_var = group_variables.create(
38
+ {
39
+ "group_id": "123",
40
+ "key": "DATABASE_URL",
41
+ "value": "postgres://localhost/mydb",
42
+ "protected": True,
43
+ "masked": True,
44
+ }
45
+ )
46
+
47
+ # Find a specific variable
48
+ db_url = group_variables.find("key=DATABASE_URL")
49
+ if db_url:
50
+ print(f"Database URL is {'protected' if db_url.protected else 'not protected'}")
51
+ ```
52
+ """
15
53
 
16
54
  id_column_name = "id"
17
55
  backend = GitlabRestBackend()
@@ -21,4 +59,9 @@ class GitlabRestGroupVariable(
21
59
  """Return the slug of the api endpoint for this model."""
22
60
  return "groups/:group_id/variables"
23
61
 
62
+ """
63
+ The ID of the group this variable belongs to.
64
+
65
+ Used to scope API requests to a specific group.
66
+ """
24
67
  group_id = String()
@@ -25,7 +25,33 @@ from clearskies_gitlab.rest.models import (
25
25
 
26
26
 
27
27
  class GitlabRestNamespace(Model):
28
- """Model for namespaces."""
28
+ """
29
+ Model for GitLab namespaces.
30
+
31
+ This model provides access to the GitLab Namespaces API. Namespaces are
32
+ containers for projects and can be either a user namespace or a group namespace.
33
+
34
+ See https://docs.gitlab.com/api/namespaces/ for more details.
35
+
36
+ Example usage:
37
+
38
+ ```python
39
+ from clearskies_gitlab.rest.models import GitlabRestNamespace
40
+
41
+
42
+ def my_function(namespaces: GitlabRestNamespace):
43
+ # List all namespaces
44
+ for ns in namespaces:
45
+ print(f"Namespace: {ns.name} ({ns.kind})")
46
+ print(f"Full path: {ns.full_path}")
47
+
48
+ # Find a specific namespace
49
+ my_ns = namespaces.find("path=my-team")
50
+ if my_ns:
51
+ print(f"Plan: {my_ns.plan}")
52
+ print(f"Billable members: {my_ns.billable_members_count}")
53
+ ```
54
+ """
29
55
 
30
56
  backend = GitlabRestBackend()
31
57
 
@@ -36,53 +62,204 @@ class GitlabRestNamespace(Model):
36
62
 
37
63
  id_column_name = "id"
38
64
 
65
+ """
66
+ The unique identifier for the namespace.
67
+ """
39
68
  id = String()
69
+
70
+ """
71
+ The display name of the namespace.
72
+ """
40
73
  name = String()
74
+
75
+ """
76
+ The URL-friendly path/slug of the namespace.
77
+ """
41
78
  path = String()
79
+
80
+ """
81
+ The type of namespace.
82
+
83
+ Values: "group" or "user".
84
+ """
42
85
  kind = Select(allowed_values=["group", "user"])
86
+
87
+ """
88
+ The full path including parent namespaces.
89
+
90
+ For example: "parent-group/child-group".
91
+ """
43
92
  full_path = String()
93
+
94
+ """
95
+ URL to the namespace's avatar image.
96
+ """
44
97
  avatar_url = String()
98
+
99
+ """
100
+ URL to the namespace's GitLab page.
101
+ """
45
102
  web_url = String()
103
+
104
+ """
105
+ The number of billable members in this namespace.
106
+
107
+ Only available for paid plans.
108
+ """
46
109
  billable_members_count = Integer()
110
+
111
+ """
112
+ The subscription plan for this namespace.
113
+
114
+ Values: "free", "premium", "ultimate", "bronze", "silver", "gold".
115
+ """
47
116
  plan = Select(allowed_values=["free", "premium", "ultimate", "bronze", "silver", "gold"])
117
+
118
+ """
119
+ The end date of the current subscription.
120
+ """
48
121
  end_date = Datetime()
122
+
123
+ """
124
+ The date when the trial period ends.
125
+ """
49
126
  trial_ends_on = Datetime()
127
+
128
+ """
129
+ Whether this namespace is on a trial subscription.
130
+ """
50
131
  trial = Boolean()
132
+
133
+ """
134
+ The total repository size in bytes.
135
+ """
51
136
  root_repository_size = Integer()
137
+
138
+ """
139
+ The number of projects in this namespace.
140
+ """
52
141
  projects_count = Integer()
142
+
143
+ """
144
+ The maximum number of seats used.
145
+ """
53
146
  max_seats_used = Integer()
147
+
148
+ """
149
+ When the max seats used value last changed.
150
+ """
54
151
  max_seats_used_changed_at = Datetime()
152
+
153
+ """
154
+ The number of seats currently in use.
155
+ """
55
156
  seats_in_use = Integer()
157
+
158
+ """
159
+ The member count including descendants.
160
+ """
56
161
  members_counts_with_descendants = Integer()
57
162
 
163
+ """
164
+ Projects in this namespace.
165
+ """
58
166
  projects = HasMany(
59
167
  gitlab_rest_project_reference.GitlabRestProjectReference,
60
168
  foreign_column_name="group_id",
61
169
  )
170
+
171
+ """
172
+ Access tokens for this namespace.
173
+ """
62
174
  access_tokens = HasMany(
63
175
  gitlab_rest_group_access_token.GitlabRestGroupAccessToken,
64
176
  foreign_column_name="group_id",
65
177
  )
178
+
179
+ """
180
+ CI/CD variables for this namespace.
181
+ """
66
182
  variables = HasMany(
67
183
  gitlab_rest_group_variable.GitlabRestGroupVariable,
68
184
  foreign_column_name="group_id",
69
185
  )
186
+
187
+ """
188
+ Subgroups within this namespace.
189
+ """
70
190
  subgroups = HasMany(
71
191
  gitlab_rest_group_subgroup_reference.GitlabRestGroupSubgroupReference,
72
192
  foreign_column_name="group_id",
73
193
  )
194
+
195
+ """
196
+ Reference to the parent namespace.
197
+ """
74
198
  parent_id = BelongsToSelf()
199
+
200
+ """
201
+ The parent namespace model.
202
+ """
75
203
  parent = BelongsToModel("parent_id")
204
+
76
205
  ### Search params
206
+
207
+ """
208
+ List of group IDs to exclude from results.
209
+ """
77
210
  skip_groups = Json()
211
+
212
+ """
213
+ Whether to include all available namespaces.
214
+ """
78
215
  all_available = Boolean()
216
+
217
+ """
218
+ Search query to filter namespaces.
219
+ """
79
220
  search = String()
221
+
222
+ """
223
+ Field to order results by.
224
+ """
80
225
  order_by = String()
226
+
227
+ """
228
+ Sort direction (asc or desc).
229
+ """
81
230
  sort = String()
231
+
232
+ """
233
+ Filter by visibility level.
234
+ """
82
235
  visibility = Select(allowed_values=["public", "internal", "private"])
236
+
237
+ """
238
+ Whether to include custom attributes in the response.
239
+ """
83
240
  with_custom_attributes = Boolean()
241
+
242
+ """
243
+ Whether to only return namespaces owned by the current user.
244
+ """
84
245
  owned = Boolean()
246
+
247
+ """
248
+ Minimum access level required to include a namespace.
249
+ """
85
250
  min_access_level = Integer()
251
+
252
+ """
253
+ Whether to only return top-level namespaces.
254
+ """
86
255
  top_level_only = Boolean()
256
+
257
+ """
258
+ Filter by repository storage location.
259
+ """
87
260
  repository_storage = String()
261
+
262
+ """
263
+ Filter by deletion date.
264
+ """
88
265
  marked_for_deletion_on = Datetime(date_format="%Y-%m-%d")