Differences between revisions 13 and 14
Revision 13 as of 2014-04-17 10:40:38
Size: 1391
Editor: techtonik
Comment: clarify how what sphinx extension does in JSON API page
Revision 14 as of 2014-10-03 09:41:44
Size: 1414
Editor: PaulMoore
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
[[CheeseShopDev|PyPI]] APIs: '''JSON''', [[PyPIXmlRpc|XMLRPC]]. [[CheeseShopDev|PyPI]] APIs: [[PyPISimple|Simple]], '''JSON''', [[PyPIXmlRpc|XMLRPC]].


You can access JSON information about packages by using the URL format

  • http://pypi.python.org/pypi/<package_name>/json

This retrieves information about the latest stable release (using PEP 386 ordering, falling back on older distutils ordering where packages are not PEP 386 compliant.) If you wish to retrieve information about a specific release you may use

  • http://pypi.python.org/pypi/<package_name>/<version>/json

You can use this to automatically generate a link to the latest release of your package with (assuming use of jQuery):

<span id="release_info" class="note">Download:
  <a href="http://pypi.python.org/pypi/roundup">latest</a></span>
<script type="text/javascript">
 $.getJSON('http://pypi.python.org/pypi/roundup/json?callback=?', function(data) {
     h = 'Download: ' + data.info.version;
     for (var i=0, url; url=data.urls[i]; ++i) {
       h += '<br><a href="' + url.url + '">' + url.filename + '</a>';

sphinxcontrib-cheeseshop Sphinx extension that adds link to latest package version to docs by including HTML code that uses JSON API above.

PyPIJSON (last edited 2014-10-03 09:41:44 by PaulMoore)

Unable to edit the page? See the FrontPage for instructions.