There is an XML-RPC interface. See the Python.org wiki page in the Cheese Shop API (old name for PyPi) .
Excerpt from this wiki:
>>> import xmlrpclib >>> server = xmlrpclib.Server('http://pypi.python.org/pypi') >>> server.package_releases('roundup') ['1.1.2'] >>> server.package_urls('roundup', '1.1.2') [{'has_sig': True, 'comment_text': '', 'python_version': 'source', 'url': 'http://pypi.python.org/packages/source/r/roundup/roundup-1.1.2.tar.gz', 'md5_digest': '7c395da56412e263d7600fa7f0afa2e5', 'downloads': 2989, 'filename': 'roundup-1.1.2.tar.gz', 'packagetype': 'sdist', 'size': 876455}, {'has_sig': True, 'comment_text': '', 'python_version': 'any', 'url': 'http://pypi.python.org/packages/any/r/roundup/roundup-1.1.2.win32.exe', 'md5_digest': '983d565b0b87f83f1b6460e54554a845', 'downloads': 2020, 'filename': 'roundup-1.1.2.win32.exe', 'packagetype': 'bdist_wininst', 'size': 614270}]
list_packages and package_releases seem to be exactly what you are looking for.
Comment by @Ronny
You just need to write Python code to determine which of the following packages matches the criteria; that is, if the package name should start with foo :
>>> packages = server.list_packages() >>> match_foo = [package for package in packages if package.startswith('foo')] >>> print len(match_foo) 2
source share