项目概述
A PyPI mirror client according to PEP 381 http://www.python.org/dev/peps/pep-0381/
项目地址
https://github.com/pypa/bandersnatch
项目页面预览
关键指标
- Stars:523
- 主要语言:Python
- License:Academic Free License v3.0
- 最近更新:2026-01-12T16:39:52Z
- 默认分支:main
本站高速下载(国内可用)
点击下载(本站镜像)
– SHA256:827b4175c7175904b97717116b667b7dc9e988a5dc0463d0f4d9b6b7254c6521
安装部署要点(README 精选)
Installation
The following instructions will place the bandersnatch executable in a
virtualenv under bandersnatch/bin/bandersnatch.
- bandersnatch requires
>= Python 3.12.0 - It may work, but we only test >= 3.12
(and may have syntax in use for that min version)
Docker
This will pull latest build. Please use a specific tag if desired.
- Docker image includes
/bandersnatch/src/runner.pyto periodically
run abandersnatch mirror - Please
/bandersnatch/src/runner.py --helpfor usage - With docker, we recommend bind mounting in a read only
bandersnatch.conf - Defaults to
/conf/bandersnatch.conf
docker pull pypa/bandersnatch
docker run pypa/bandersnatch bandersnatch --help
Docker Compose
Bandersnatch setup using docker-compose is available here
Quickstart
- Run
bandersnatch mirror– it will create an empty configuration file
for you in/etc/bandersnatch.conf. - Review
/etc/bandersnatch.confand adapt to your needs. - Run
bandersnatch mirroragain. It will populate your mirror with the
current status of all PyPI packages.
Current mirror package size can be seen here: https://pypi.org/stats/ - A
blocklistorallowlistcan be created to cut down your mirror size.
You might want to Analyze PyPI downloads
to determine which packages to add to your list. - Run
bandersnatch mirrorregularly to update your mirror with any
intermediate changes.
常用命令(从 README 提取)
docker pull pypa/bandersnatch
docker run pypa/bandersnatch bandersnatch --help
python3 -m venv bandersnatch
bandersnatch/bin/pip install bandersnatch
bandersnatch/bin/bandersnatch --help
通用部署说明
- 下载源码并阅读 README
- 安装依赖(pip/npm/yarn 等)
- 配置环境变量(API Key、模型路径、数据库等)
- 启动服务并测试访问
- 上线建议:Nginx 反代 + HTTPS + 进程守护(systemd / pm2)
免责声明与版权说明
本文仅做开源项目整理与教程索引,源码版权归原作者所有,请遵循对应 License 合规使用。
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END








暂无评论内容