3
3
Users can populate their repositories with content from an external source like PyPI by syncing
4
4
their repository.
5
5
6
-
7
6
## Create a Repository
8
7
9
8
=== "Run"
@@ -17,21 +16,23 @@ their repository.
17
16
18
17
```
19
18
{
20
- "pulp_href": "/pulp/api/v3/repositories/python/python/8fbb24ee-dc91-44f4-a6ee-beec60aa542d/",
21
- "pulp_created": "2021-03-09T04:11:54.347921Z",
22
- "versions_href": "/pulp/api/v3/repositories/python/python/8fbb24ee-dc91-44f4-a6ee-beec60aa542d/versions/",
23
- "pulp_labels": {},
24
- "latest_version_href": "/pulp/api/v3/repositories/python/python/8fbb24ee-dc91-44f4-a6ee-beec60aa542d/versions/0/",
25
- "name": "foo",
26
- "description": null,
27
- "remote": null
28
- }
19
+ "pulp_href": "/pulp/api/v3/repositories/python/python/0196ba2a-f353-736a-854c-2d415389a509/",
20
+ "prn": "prn:python.pythonrepository:0196ba2a-f353-736a-854c-2d415389a509",
21
+ "pulp_created": "2025-05-10T12:28:19.156941Z",
22
+ "pulp_last_updated": "2025-05-10T12:28:19.169190Z",
23
+ "versions_href": "/pulp/api/v3/repositories/python/python/0196ba2a-f353-736a-854c-2d415389a509/versions/",
24
+ "pulp_labels": {},
25
+ "latest_version_href": "/pulp/api/v3/repositories/python/python/0196ba2a-f353-736a-854c-2d415389a509/versions/0/",
26
+ "name": "foo",
27
+ "description": null,
28
+ "retain_repo_versions": null,
29
+ "remote": null,
30
+ "autopublish": false
31
+ }
29
32
```
30
33
31
34
Reference: [ Python Repository Usage] ( site:pulp_python/restapi/#tag/Repositories:-Python )
32
35
33
-
34
-
35
36
## Create a Remote
36
37
37
38
Creating a remote object informs Pulp about an external content source. In this case, we will be
@@ -49,29 +50,56 @@ itself, a fixture, or even an instance of Pulp 2.
49
50
50
51
```
51
52
{
52
- "pulp_href": "/pulp/api/v3/remotes/python/python/a9bb3a02-c7d2-4b2e-9b66-050a6c9b7cb3/",
53
- "pulp_created": "2021-03-09T04:14:02.646835Z",
53
+ "pulp_href": "/pulp/api/v3/remotes/python/python/0196ba2b-1461-7d0d-99f6-5f75610abf71/",
54
+ "prn": "prn:python.pythonremote:0196ba2b-1461-7d0d-99f6-5f75610abf71",
55
+ "pulp_created": "2025-05-10T12:28:27.617672Z",
56
+ "pulp_last_updated": "2025-05-10T12:28:27.617697Z",
54
57
"name": "bar",
55
58
"url": "https://pypi.org/",
56
59
"ca_cert": null,
57
60
"client_cert": null,
58
61
"tls_validation": true,
59
62
"proxy_url": null,
60
63
"pulp_labels": {},
61
- "pulp_last_updated ": "2021-03-09T04:14:02.646845Z" ,
62
- "download_concurrency ": 10 ,
64
+ "download_concurrency ": null ,
65
+ "max_retries ": null ,
63
66
"policy": "on_demand",
64
67
"total_timeout": null,
65
68
"connect_timeout": null,
66
69
"sock_connect_timeout": null,
67
70
"sock_read_timeout": null,
68
71
"headers": null,
69
72
"rate_limit": null,
73
+ "hidden_fields": [
74
+ {
75
+ "name": "client_key",
76
+ "is_set": false
77
+ },
78
+ {
79
+ "name": "proxy_username",
80
+ "is_set": false
81
+ },
82
+ {
83
+ "name": "proxy_password",
84
+ "is_set": false
85
+ },
86
+ {
87
+ "name": "username",
88
+ "is_set": false
89
+ },
90
+ {
91
+ "name": "password",
92
+ "is_set": false
93
+ }
94
+ ],
70
95
"includes": [
71
96
"shelf-reader"
72
97
],
73
98
"excludes": [],
74
99
"prereleases": true,
100
+ "package_types": [],
101
+ "keep_latest_packages": 0,
102
+ "exclude_platforms": []
75
103
}
76
104
```
77
105
@@ -80,7 +108,7 @@ Reference: [Python Remote Usage](site:pulp_python/restapi/#tag/Remotes:-Python)
80
108
## A More Complex Remote
81
109
82
110
If only the name of a project is specified, every distribution of every version of that project
83
- will be synced. You can use the version_specifier field to ensure only distributions you care
111
+ will be synced. You can use the version specifier field to ensure only distributions you care
84
112
about will be synced:
85
113
86
114
``` bash
@@ -115,22 +143,22 @@ You can also filter packages by their type, platform and amount synced through t
115
143
"exclude_platforms", and "keep_latest_packages" fields respectively, like so:
116
144
117
145
``` bash
146
+ # Sync only sdist and bdist_wheel package types, exclude any packages built
147
+ # for windows and keep the five latest versions
118
148
pulp python remote create \
119
149
--name ' complex-filters' \
120
150
--url ' https://pypi.org/' \
121
151
--includes ' ["django"]' \
122
- --package-types ' ["sdist", "bdist-wheel "]' # only sync sdist and bdist-wheel package types \
123
- --exclude-platforms ' ["windows"]' # exclude any packages built for windows \
124
- --keep-latest-packages 5 # keep the five latest versions
152
+ --package-types ' ["sdist", "bdist_wheel "]' \
153
+ --exclude-platforms ' ["windows"]' \
154
+ --keep-latest-packages 5
125
155
```
126
156
127
157
Reference: [ Python Remote Usage] ( site:pulp_python/restapi/#tag/Remotes:-Python )
128
158
129
-
130
-
131
159
### Creating a remote to sync all of PyPI
132
160
133
- A remote can be setup to sync all of PyPI by not specifying any included packages like so:
161
+ A remote can be set up to sync all of PyPI by not specifying any included packages, like so:
134
162
135
163
``` bash
136
164
pulp python remote create \
@@ -173,22 +201,25 @@ sync with. You are telling pulp to fetch content from the remote and add to the
173
201
174
202
```
175
203
{
176
- "pulp_href": "/pulp/api/v3/repositories/python/python/8fbb24ee-dc91-44f4-a6ee-beec60aa542d/versions/1/",
177
- "pulp_created": "2021-03-09T04:20:21.896132Z",
204
+ "pulp_href": "/pulp/api/v3/repositories/python/python/0196ba2a-f353-736a-854c-2d415389a509/versions/1/",
205
+ "prn": "prn:core.repositoryversion:0196ba2b-655c-7745-b10f-bdde15a941c6",
206
+ "pulp_created": "2025-05-10T12:28:48.349938Z",
207
+ "pulp_last_updated": "2025-05-10T12:28:49.031497Z",
178
208
"number": 1,
209
+ "repository": "/pulp/api/v3/repositories/python/python/0196ba2a-f353-736a-854c-2d415389a509/",
179
210
"base_version": null,
180
211
"content_summary": {
181
212
"added": {
182
213
"python.python": {
183
214
"count": 2,
184
- "href": "/pulp/api/v3/content/python/packages/?repository_version_added=/pulp/api/v3/repositories/python/python/8fbb24ee-dc91-44f4-a6ee-beec60aa542d /versions/1/"
215
+ "href": "/pulp/api/v3/content/python/packages/?repository_version_added=/pulp/api/v3/repositories/python/python/0196ba2a-f353-736a-854c-2d415389a509 /versions/1/"
185
216
}
186
217
},
187
218
"removed": {},
188
219
"present": {
189
220
"python.python": {
190
221
"count": 2,
191
- "href": "/pulp/api/v3/content/python/packages/?repository_version=/pulp/api/v3/repositories/python/python/8fbb24ee-dc91-44f4-a6ee-beec60aa542d /versions/1/"
222
+ "href": "/pulp/api/v3/content/python/packages/?repository_version=/pulp/api/v3/repositories/python/python/0196ba2a-f353-736a-854c-2d415389a509 /versions/1/"
192
223
}
193
224
}
194
225
}
0 commit comments