473,325 Members | 2,442 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Is there a PyPI API?

Hi,

I am experimenting on creating a GUI wrapper for easy_install and I
would like to be able to allow the user the browse PyPI topically.
However, I am having some trouble figuring out how to get the
information in a topical manner.

I can get the list of classifiers easily using urllib2 like so:

def getPyPiClassifiers():
print 'Get list of Topics from PyPI...'

url = 'http://pypi.python.org/pypi?%3Aaction=list_classifiers'
res = urllib2.urlopen(url)
page = res.read()

And there's a "light-weight" list of all the packages on PyPI here:
http://pypi.python.org/simple/

I just can't figure out how to get the metadata, I guess. I found Paul
Boddies SGMLParser example (http://www.boddie.org.uk/python/HTML.html)
which can get me some URLs, but what I really need is some kind of
dict of tuples or lists like this:

{'Framework':(('Buildout', 'bazaarrecipe', 'Buildout recipe for
Bazaar'),
('Buildout', 'buildout_script', 'zc.buildout
recipes for generating script and conf files from templates.')
)}

Any ideas on how best to approach this would be great. I'm still
learning HTML/XML parsing techniques and am having trouble wrapping my
mind around it.

Thanks!

Mike
Jun 27 '08 #1
2 2945
I just can't figure out how to get the metadata, I guess.

See

http://wiki.python.org/moin/PyPiXmlRpc

Regards,
Martin
Jun 27 '08 #2
On May 10, 2:23 pm, "Martin v. Löwis" <mar...@v.loewis.dewrote:
I just can't figure out how to get the metadata, I guess.

See

http://wiki.python.org/moin/PyPiXmlRpc

Regards,
Martin
Ah-so. Most helpful, Martin. Thanks a lot!

Mike
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jeremy Fincher | last post by:
I was just getting ready to write a module to search PyPI in order to add the ability to search PyPI to my application, when I thought, "Hey, this is the Python community's package index -- maybe...
1
by: Aroldo Souza-Leite | last post by:
Hi, trying to register in PyPI, I get this SMTPRecipientsRefused: {'asouzaleite@gmx.de': (451, 'envelope address appears to be forged')} Can anybody help me there?
1
by: p.kosina | last post by:
I tried to make a registration on www.python.org/PyPI, but no email confirmation received. Is it working? Is anyone responsible for that here? Thanks a lot Pavel
1
by: Daniel Yoo | last post by:
Does anyone know why PyPI's doesn't like my PKG-INFO file? Here's what I have: ###### mumak:~/work/aho/src/python/dist/ahocorasick-0.8 dyoo$ cat PKG-INFO Metadata-Version: 1.0 Name:...
7
by: John Machin | last post by:
Sorry in advance if this is not the correct forum ... I'm trying to upload what appears to be a perfectly OK zip file as a "source" file type to PyPI, and am getting this response: Error......
3
by: Alia Khouri | last post by:
Due to a recent site overhaul by sourceforge certain files linked to from pypi won't install. For example, in trying to install all the dependencies for the subway web framework, I got this kind of...
6
by: Steven Bethard | last post by:
I just tried to upload new versions of the argparse module to PyPI, but it seems like I can no longer upload Windows installers: $ setup.py sdist bdist_wininst upload ... running upload...
5
by: makoto kuwata | last post by:
Hi, I have a trouble around PyPI and easy_install. I have developed OSS (Tenjin) and registered it to PyPI. http://pypi.python.org/pypi/Tenjin/0.6.1 But I can't install it by 'easy_install'...
1
by: dmitrey | last post by:
hi all, 1. when I commit a new release to PYPI, I can use stored data (by my browser: Name, package summary, keywords etc), but in the last line (classification) I had to chose all those lines...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.