@@ -5,19 +5,24 @@ Package index mirrors and caches
5
5
================================
6
6
7
7
:Page Status: Incomplete
8
- :Last Reviewed: 2014-12-24
8
+ :Last Reviewed: 2023-11-08
9
9
10
-
11
- Mirroring or caching of PyPI can be used to speed up local package installation,
10
+ Mirroring or caching of PyPI (and other
11
+ :term: `package indexes <Package Index> `) can be used to speed up local
12
+ package installation,
12
13
allow offline work, handle corporate firewalls or just plain Internet flakiness.
13
14
14
- Three options are available in this area:
15
+ There are multiple classes of options in this area:
16
+
17
+ 1. local/hosted caching of package indexes.
18
+
19
+ 2. local/hosted mirroring of a package index. A mirror is a (whole or
20
+ partial) copy of a package index, which can be used in place of the
21
+ original index.
15
22
16
- 1. pip provides local caching options,
17
- 2. devpi provides higher-level caching option, potentially shared amongst
18
- many users or machines, and
19
- 3. bandersnatch provides a local complete mirror of all PyPI :term: `packages
20
- <Distribution Package> `.
23
+ 3. private package index with fall-through to public package indexes (for
24
+ example, to mitigate dependency confusion attacks), also known as a
25
+ proxy.
21
26
22
27
23
28
Caching with pip
@@ -38,26 +43,75 @@ cached copies of :term:`packages <Distribution Package>`:
38
43
python3 -m pip install --no-index --find-links=/tmp/wheelhouse SomeProject
39
44
40
45
41
- Caching with devpi
42
- ------------------
43
-
44
- devpi is a caching proxy server which you run on your laptop, or some other
45
- machine you know will always be available to you. See the `devpi
46
- documentation for getting started `__.
47
-
48
- __ https://devpi.net/docs/devpi/devpi/latest/+d/quickstart-pypimirror.html
49
-
50
-
51
- Complete mirror with bandersnatch
52
- ----------------------------------
53
-
54
- bandersnatch will set up a complete local mirror of all PyPI :term: `packages
55
- <Distribution Package> ` (externally-hosted packages are not mirrored). See
56
- the `bandersnatch documentation for getting that going `__.
57
-
58
- __ https://github.com/pypa/bandersnatch/
59
-
60
- A benefit of devpi is that it will create a mirror which includes
61
- :term: `packages <Distribution Package> ` that are external to PyPI, unlike
62
- bandersnatch which will only cache :term: `packages <Distribution Package> `
63
- hosted on PyPI.
46
+ Existing projects
47
+ -----------------
48
+
49
+ .. list-table ::
50
+ :header-rows: 1
51
+
52
+ * - Project
53
+ - Cache
54
+ - Mirror
55
+ - Proxy
56
+ - Additional notes
57
+
58
+ * - :ref: `devpi `
59
+ - ✔
60
+ - ✔
61
+ -
62
+ - multiple indexes with inheritance; syncing, replication, fail-over;
63
+ package upload
64
+
65
+ * - :ref: `bandersnatch `
66
+ - ✔
67
+ - ✔
68
+ -
69
+ -
70
+
71
+ * - :ref: `simpleindex `
72
+ -
73
+ -
74
+ - ✔
75
+ - custom plugin enables caching; re-routing to other package indexes
76
+
77
+ * - :ref: `pypicloud `
78
+ - ✔
79
+ -
80
+ - ✔
81
+ - unmaintained; authentication, authorisation
82
+
83
+ * - :ref: `pulppython `
84
+ -
85
+ - ✔
86
+ - ✔
87
+ - plugin for Pulp; multiple proxied indexes; package upload
88
+
89
+ * - :ref: `proxpi `
90
+ - ✔
91
+ -
92
+ - ✔
93
+ - multiple proxied indexes
94
+
95
+ * - :ref: `nginx_pypi_cache `
96
+ - ✔
97
+ -
98
+ - ✔
99
+ - multiple proxied indexes
100
+
101
+ * - :ref: `flaskpypiproxy `
102
+ - ✔
103
+ -
104
+ - ✔
105
+ - unmaintained
106
+
107
+ * - `Apache <https://httpd.apache.org/ >`_
108
+ - ✔
109
+ -
110
+ - ✔
111
+ - using
112
+ `mod_rewrite
113
+ <https://httpd.apache.org/docs/current/mod/mod_rewrite.html> `_
114
+ and
115
+ `mod_cache_disk
116
+ <https://httpd.apache.org/docs/current/mod/mod_cache_disk.html> `_,
117
+ you can cache requests to package indexes through an Apache server
0 commit comments