I would like to run my own internal PyPI server, foregg distribution within my organization.
I have found a few projects, such as:
As I understand it, pypi.python.org uses software called Cheese Shop.
My questions:
- Why can't I use Cheese Shop itself? (I can't find it and am not sure it exists)
- How do other people solve this problem? (Currently we useblushSVN to distribute 'eggs')
This seems canonical:The Python Wiki,Python Implementations. Still, I'm interested in feedback.
How can I roll my own PyPI?
- The main reason for the clones is that the pypi code is horrible :)Jorge Vargas– Jorge Vargas2009-11-17 22:04:20 +00:00CommentedNov 17, 2009 at 22:04
- We tried to assemble all dependencies in a buildout script @Buildout crate.ioaltipard– altipard2013-05-02 19:47:29 +00:00CommentedMay 2, 2013 at 19:47
- related:stackoverflow.com/q/18052217/611007n611x007– n611x0072015-04-23 15:26:12 +00:00CommentedApr 23, 2015 at 15:26
- The second link is broken (plone.org):"This page does not seem to exist…"Peter Mortensen– Peter Mortensen2024-02-05 23:33:21 +00:00CommentedFeb 5, 2024 at 23:33
9 Answers9
For a lightweight solution, usepypiserver.
Comments
Update: PyPi is now powered byWarehouse, which is the replacement for Cheese Shop.
The source to Cheese Shop can be downloaded fromhttps://bitbucket.org/pypa/pypi/src. There is also an example, from the page you linked to, of using Apache as a "dumb" Python package repository:
# Mount pypi repositories into URI spaceAlias /pypi /var/pypi# /pypi/dev: Redirect for unknown packages (fallback to pypi)RewriteCond /var/pypi/dev/$1 !-dRewriteCond /var/pypi/dev/$1 !-fRewriteRule ^/pypi/dev/([^/]+)/?$ http://pypi.python.org/pypi/$1/ [R,L]RewriteCond /var/pypi/dev/$1/$2 !-fRewriteRule ^/pypi/dev/([^/]+)/([^/]+)$ http://pypi.python.org/pypi/$1/$2 [R,L]# /pypi/stable: Redirect for unknown packages (fallback to pypi)RewriteCond /var/pypi/stable/$1 !-dRewriteCond /var/pypi/stable/$1 !-fRewriteRule ^/pypi/stable/([^/]+)/?$ http://pypi.python.org/pypi/$1/ [R,L]RewriteCond /var/pypi/stable/$1/$2 !-fRewriteRule ^/pypi/stable/([^/]+)/([^/]+)$ http://pypi.python.org/pypi/$1/$2 [R,L]1 Comment
Warehouse
Warehouse would be your best bet in 2017. From the project's README:
Warehouse is a next generation Python Package Repository designed to replace the legacy code base that currently powersPyPI
...
You can run Warehouse locally using
dockeranddocker-compose. SeeGetting started in the documentation for instructions on how to set it up.
It is maintained byThe Python Packaging Authority (PyPA) who work in cooperation with members of the Python core development team, and there is alive version running athttps://pypi.org/ which mirrors everything in the legacy PyPI (https://pypi.python.org/).
1 Comment
devpi
We are using it in a corporate environment and are pretty satisfied. It supports replication, private indexes and index inheritance.
2 Comments
There is a fork of djangopypi named djangopypi2 you can get it fromhttps://github.com/popen2/djangopypi2/, I installed it and works for me, this option is what I had choose from a list of about 24 alternatives that I have found in a recently search, you can see the list here:http://uyeya.blogspot.com/2013/10/list-of-local-alternatives-of-pypi.html
Comments
Updated: crate.io has shut down and the domain is now something else entirely.
One project that hasn't been mentioned ishttps://crate.io/, which seems very active. It claims to be a "Next Generation Python Packaging Index", but they have their repositories split nicely into pieces that seem to welcome customization and remixing to your purposes.
4 Comments
If you would like a lighter solution than deploying an entire PyPI server, you could try using a server index generated bybasketweaver.
1 Comment
Another missing from this (oldish) list:
djangopypi
It is Django based, which might be a slight overkill, but I love Django and it makes it extremely simple to modify it to your need should it not be satisfying.
Comments
And thecrate source code is available, though documentation is, least that can be said, nonexistent:
It's a Django application providing a Python Package Index. It uses a couple of other packages fromtheCrate repositories, so you might be able to roll out your own version without Django.
I'm specifically thinking about a static one. I always thought there should be a very easy way to go explore directly some [preconfigured] repositories and shop cheese directly from my GitHub orBitbucket public and private repositories, with just a simple (gunicorn) process running.
Explore related questions
See similar questions with these tags.





