How to get information from PYPI via xmlrpc
PYPI - python package interface/repository has a xmlrpc interface that we can connect to via a python program!!
We will use xmlrpclib to connect to PYPI.
#Import required library
import xmlrpclib
#URL of PYPI xmlrpc
XML_RPC_SERVER = 'http://cheeseshop.python.org/pypi'
#Connect to the server
pypi=xmlrpclib.ServerProxy(XML_RPC_SERVER)
#Get a list of packages
pypi.list_packages()
#Get a current version of a package. We will look for package called datahub.
pypi.package_releases('datahub')
#Get metadata information of that package
pypi.release_data(' datahub' ,' 0.7.79dev' )
#Lets display it nicely:
for k,v in pypi.release_data('datahub','0.7.79dev').items():
print k,':',v
Now you can browse, all the packages, look for keywords, etc. You can also check out yolk if you want to have a command line interface for pypi. Otherwise look at their code especially pypi.py to see how they get around pypi information.
Enjoy