HNHacker News
TopNewBestAskShowJobs

donaldstufft

595 karma · joined January 3, 2012

submissionscomments
donaldstufft··on Crate.io: A new kind of Python package index
Crate is a synonym for Package and I liked the name :)
donaldstufft··on Crate.io: A new kind of Python package index
Have you looked at the PyPI codebase? ;)

The real answer is I have. I'm a PyPI administrator now and have been enacting a lot of these benefits on PyPI itself. Just this weekend I've deployed a CDN in front of all of PyPI so that package downloads have sped up by 1-3 orders of magnitude depending on location.

Previously I had pushed hard for getting a real valid and trusted SSL certificate on PyPI, moving the user provided html/js from packages.python.org to pythonhosted.org in order to prevent CSRF fixation attacks.

Like I said Crate is an experiment. One that has enabled me to push for good changes in PyPI.

donaldstufft··on Crate.io: A new kind of Python package index
Working with PyPI tends to make for an angry time.
donaldstufft··on Crate.io: A new kind of Python package index
It uses the XMLRPC API to pick up new packages. http://wiki.python.org/moin/PyPIXmlRpc
donaldstufft··on Crate.io: A new kind of Python package index
Crate is currently an experiment of mine into what a better package system would look like.

It can be used as a drop in replacement against PyPI using the --index-url option of pip. (pip install --index-url=https://simple.crate.io/)

It has a number of security and speed improvements over PyPI some of which I've contributed back to or pushed for PyPI to get overtime.

donaldstufft··on Crate.io - an improv(ed|ing) Python Package index
pip supports a download cache (off by default) that stores packages as their urlname. It works similar to how you describe. It will see it needs the package at url xyz.com/package.tar.gz, it'll check it's download cache and if it doesn't exist there it will download the file from the url and save it to the cache.

The cacheable urls stem from the fact that currently on PyPI you can delete an existing file you've uploaded, and reupload a file of the same name. Pip (and any other cache like varnish etc) isn't notified of the fact that what used to be at url xyz.com/packages.tar.gz is gone and now something else is at xyz.com/packages.tar.gz. This can cause issues with installing packages, especially on remote deployment infrastructures. With crate I place the sha256 of the file in the url, so if someone deletes + uploads the same name, it should still (unless you get (un)lucky and get a collision somehow) have a completely different url, so pip and other caches will see it as a different file.

As a side effect it would allow a simple caching proxy to be installed at someones office, or wherever that easily does the behavior you describe as well. It could function similarly to pip but be shared amongst multiple people.

donaldstufft··on Crate.io - an improv(ed|ing) Python Package index
This is a good idea! I used the subdomain because I plan on hosting the "simple" interface in EC2 (Packages are hosted on S3/CloudFront) in multiple availability zones while my main site is hosted on Gondor.io.

However I could enable a short url that redirected to simple.crate.io to allow easier command line access.

Thanks!

donaldstufft··on Crate.io - an improv(ed|ing) Python Package index
Purely coincidence. To be honest I've never seen Rust before, when I was trying to name it I just hit a thesaurus up until I came up with a word that had something to do with "packaging" (Shipping Crates!) that was available that I liked.
← PreviousPage 4 of 4