blob: 60c4436d834515f64c6bb99c3ac7369ededb8ddd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
########
Packages
########
Packages allow you to utilize GitLab as a private repository for a variety
of common package managers.
Project Packages
=====================
Reference
---------
* v4 API:
+ :class:`gitlab.v4.objects.ProjectPackage`
+ :class:`gitlab.v4.objects.ProjectPackageManager`
+ :attr:`gitlab.v4.objects.Project.packages`
* GitLab API: https://docs.gitlab.com/ee/api/packages.html#within-a-project
Examples
--------
List the packages in a project::
packages = project.packages.list()
Filter the results by ``package_type`` or ``package_name`` ::
packages = project.packages.list(package_type='pypi')
Get a specific package of a project by id::
package = project.packages.get(1)
Delete a package from a project::
package.delete()
# or
project.packages.delete(package.id)
Group Packages
===================
Reference
---------
* v4 API:
+ :class:`gitlab.v4.objects.GroupPackage`
+ :class:`gitlab.v4.objects.GroupPackageManager`
+ :attr:`gitlab.v4.objects.Group.packages`
* GitLab API: https://docs.gitlab.com/ee/api/packages.html#within-a-group
Examples
--------
List the packages in a group::
packages = group.packages.list()
Filter the results by ``package_type`` or ``package_name`` ::
packages = group.packages.list(package_type='pypi')
Project Package Files
=====================
Reference
---------
* v4 API:
+ :class:`gitlab.v4.objects.ProjectPackageFile`
+ :class:`gitlab.v4.objects.ProjectPackageFileManager`
+ :attr:`gitlab.v4.objects.ProjectPackage.package_files`
* GitLab API: https://docs.gitlab.com/ee/api/packages.html#list-package-files
Examples
--------
List package files for package in project::
package = project.packages.get(1)
package_files = package.package_files.list()
|