Getting Started

Please make sure you are using VirtualEnv. This will isolate yopypi from other packages:

pip install virtualenv


yopypi can use a configuration file in a ini style. But this is not required!

yopypi uses these settings by default:

'web_host': 'localhost',
'web_port': '8080',
'mirrors' : ['', '']

The above values are in the form of a dictionary, but getting them correctly in a ini file would be something like this:

# Sample Configuration File for yopypi

[DEFAULT] = localhost
yopypi.web.port = 8080
yopypi.mirrors =

Running the server

To be able to catch your requests to pypi we need to run a webserver. yopypi provides a command line tool for this: yopypi-cli. This tool will allow you to start, stop and even pass a configuration file if you need to.


yopypi-cli start


yopypi-cli stop

Start with configuration file:

yopypi-cli start app.conf

Test it!

If you started the server with the defaults (e.g. localhost:8080) try and go to that same address

If PYPI is up, you should be automatically be redirected.

That is how yopypi works! We test if PYPI is up and redirect you there, if not, we try one of the mirrors the configuration supplied.

PYPI tools and Configurations

There are a few tools that interact with PYPI and they all take different configuration approaches.

For pip you would need something like this in the config:

index-url =

For buildout:

index =

It is necessary to add that portion of the URL. To check everything is working correctly, create a new VirtualEnv in a temporary directory and see what happens! With yopypi running you should have a similar output to this (tested with one of my packages):

(foo)[alfredo@mbp ~/foo]$ pip install supay
Downloading/unpacking supay
Downloading Supay-0.0.6.tar.gz
Running egg_info for package supay
Extracting in /var/folders/1Y/1YKT8JpbGuSvDHiafKs5gU+++TI/-Tmp-/tmprg36Q3
Now working in /var/folders/1Y/1YKT8JpbGuSvDHiafKs5gU+++TI/-Tmp-/tmprg36Q3/distribute-0.6.10
Building a Distribute egg in /Users/alfredo/foo/build/supay
Installing collected packages: supay
Running install for supay
changing mode of build/scripts-2.6/ from 644 to 755
changing mode of /Users/alfredo/foo/bin/ to 755
Successfully installed supay
Cleaning up...

If you are able to catch it... PYPI was up and running when the above happened so even though you are pointing yopypi to it is redirecting the request to PYPI.

当前网页内容, 由 大妈 ZoomQuiet 使用工具: ScrapBook :: Firefox Extension 人工从互联网中收集并分享;
若有不妥, 欢迎评注提醒:


订阅 substack 体验古早写作:

点击注册~> 获得 100$ 体验券: DigitalOcean Referral Badge

关注公众号, 持续获得相关各种嗯哼:


关于 ~ DebugUself with DAMA ;-)
公安备案号: 44049002000656 ...::