Pypi本地缓存代理
Project description
pypi-proxy
Pypi本地代理。当本地未找到时,从国内pypi镜像网站(目前使用豆瓣pypi镜像)拉取并缓存于本地,下次再访问时直接从本地获取。
docker镜像制作
sh build-docker.sh
拉起pypi-proxy服务
docker-compose up
默认将7979端口映射到宿主机上进行监听,缓存包文件挂载在宿主机的~/mypypi。可以通过修改docker-compose.yml文件来改变映射至宿主机的端口号,以及缓存文件的挂载位置。
访问
假定pypi-proxy服务运行于域名/IP地址为的主机的7979端口上,通过执行以下命令来安装包:
pip3 install -i http://<hostname>:7979/pypi/simple/ --trusted-host <hostname> <package-name>[==<版本号>] --timeout 1200
注:对于文件体积较大的包,建议在pip命令后面加上--timeout参数,将timeout设为一个比正常下载时间更大的值。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pypi-proxy-0.0.2.tar.gz
(2.4 kB
view details)
Built Distribution
File details
Details for the file pypi-proxy-0.0.2.tar.gz
.
File metadata
- Download URL: pypi-proxy-0.0.2.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 254dbda832d7013b4c39606dd9b75a68a6f90c99f92ab010aa55288289c36cf5 |
|
MD5 | ba0abcf346cd71451dec63febf5ac7c7 |
|
BLAKE2b-256 | 88931259a290743eae73b0f901d233bc2484f0cb7843dce99b2a036c3e897d44 |
File details
Details for the file pypi_proxy-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: pypi_proxy-0.0.2-py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1f9dbbeb28795dff4b67e935d6d3919474fc98b5d3642a83f153e6327f0e351 |
|
MD5 | df55c23b91b3a6617192e797e29048a1 |
|
BLAKE2b-256 | 2c7fc3b9bcfee19b3d34d973d6e7d7097085064fff633b12a2b9f862721e2813 |