Revision 7 as of 2013-03-22 08:44:40

Clear message

Note you can also use the XMLRPC api.

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

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

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>';
     }
     $('#release_info').html(h);
 });
</script>

Sphinx has support for putting an up-to-date Download link in your website using that JSON with one simple directive, for example (for the "roundup" package):

.. pypi-release:: Roundup
   :prefix: Download
   :class: note

See the sphinxcontrib-cheeseshop project documentation for more information.

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