crate-archive / crate-site

OBSOLETE, SEE crate.io, crate.web, and crate.pypi
https://crate.io/
BSD 2-Clause "Simplified" License
87 stars 13 forks source link

API to expose downloads #2

Closed aclark4life closed 12 years ago

aclark4life commented 12 years ago

I would love to query crate.io for package downloads and then display them on: pythonpackages.com. E.g. http://pythonpackages.com/info/django could contain a link to: http://packages.crate.io/a/f/9/1/af9118c4e8a063deb0b8cda901fcff2b805e7cf496c93fd43507163f3cde156b/Django-1.3.1.tar.gz. It looks like I could construct the link if could get a hold of the sha256 hash. Any plans to expose this info via an API? Great job with the site!

dstufft commented 12 years ago

Yes I absolutely do plan on providing an API to as much of Crate's data as I can. The plans are to use http://tastypieapi.org/ and provide that data via json/yaml/xml.

dstufft commented 12 years ago

I also wonder, what would be your preferred way of consuming this data? Would an api keyed off the package name that contains all that metadata work well for you?

dstufft commented 12 years ago

This isn't documented, but I have an API up now at crate.io/api/v1/, ex; http://crate.io/api/v1/release/Django-1.3.1/?format=json

aclark4life commented 12 years ago

Sweet! Sorry, I was going to reply "yes" to keying off the package name. I'll give it a whirl tonight, thanks.

aclark4life commented 12 years ago

This is now used on pythonpackages.com, thanks! See any package page e.g. http://pythonpackages.com/package/django. Link to crate.io download is on the left.