pypi changelog api

Discussion in 'Python' started by Gregg Caines, Feb 18, 2013.

  1. Gregg Caines

    Gregg Caines Guest

    Hey all,

    I'm trying to write a script that tracks changes on pypi, and I've come across the xmlrpc interface, specifically the 'changelog' api. It's definitely what I'm looking for, but I get an absolutely massive xml response from it at once and I was hoping there might be either some way to "page" throughit with mulitple requests, or a different-but-similar API.

    Thanks in advance,
    Gregg
    Gregg Caines, Feb 18, 2013
    #1
    1. Advertising

  2. Hi Gregg,

    to get a smaller response, you can simply pass in a timestamp, like this:

    >>> client = xmlrpclib.ServerProxy('http://pypi.python.org/pypi')
    >>> import time
    >>> client.changelog(int(time.time() - 600))

    [['vs.bootstrap.plonetheme', '1.0.1', 1361451748, 'update description,
    classifiers'], ['numericalunits', '1.11', 1361451759, 'new release'],
    ['numericalunits', '1.11', 1361451760, 'add source file
    numericalunits-1.11.tar.gz'], ['autobahn_rce', '0.6.0', 1361451798,
    'remove'], ['vs.bootstrap.plonetheme', '1.0.1', 1361451816, 'update
    description, classifiers'], ['vs.bootstrap.plonetheme', '1.0.1',
    1361451882, 'update description, classifiers'], ['autobahn_rce',
    '0.5.9', 1361451956, 'new release'], ['autobahn_rce', '0.5.9',
    1361451971, 'add source file autobahn_rce-0.5.9.tar.gz']]

    I don't think there's way to get older chunks of the changelog though.
    What would you need those for?

    If you need the entire changelog, just download it once (it's not that
    large, barely 40MB). Here it is, up until 1361452402 (now):

    http://phihag.de/2013/pypi-changelog-2013-02-20.json.bz2

    What I'd like is a real-time push service of changelog entries, but I'm
    not certain that would be scalable.

    Cheers,

    Philipp


    On 02/18/2013 02:16 AM, Gregg Caines wrote:
    > Hey all,
    >
    > I'm trying to write a script that tracks changes on pypi, and I've comeacross the xmlrpc interface, specifically the 'changelog' api. It's definitely what I'm looking for, but I get an absolutely massive xml response from it at once and I was hoping there might be either some way to "page" through it with mulitple requests, or a different-but-similar API.
    >
    > Thanks in advance,
    > Gregg




    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.12 (GNU/Linux)

    iEYEAREKAAYFAlEmIjsACgkQ9eq1gvr7CFyrpACdG4sESW8qWwt6Jik1zAIU+sQW
    aU4AoLzej3F44nANSONNYM1ZYL91bkFZ
    =/uBA
    -----END PGP SIGNATURE-----
    Philipp Hagemeister, Feb 21, 2013
    #2
    1. Advertising

  3. I'd love to see https://crate.io/ set up an API or at the very least an RSS
    feed for tracking changes. I've emailed the author about this. I think if
    enough people do, an RSS feed would be easy to setup.


    On Thu, Feb 21, 2013 at 5:33 AM, Philipp Hagemeister <>wrote:

    > Hi Gregg,
    >
    > to get a smaller response, you can simply pass in a timestamp, like this:
    >
    > >>> client = xmlrpclib.ServerProxy('http://pypi.python.org/pypi')
    > >>> import time
    > >>> client.changelog(int(time.time() - 600))

    > [['vs.bootstrap.plonetheme', '1.0.1', 1361451748, 'update description,
    > classifiers'], ['numericalunits', '1.11', 1361451759, 'new release'],
    > ['numericalunits', '1.11', 1361451760, 'add source file
    > numericalunits-1.11.tar.gz'], ['autobahn_rce', '0.6.0', 1361451798,
    > 'remove'], ['vs.bootstrap.plonetheme', '1.0.1', 1361451816, 'update
    > description, classifiers'], ['vs.bootstrap.plonetheme', '1.0.1',
    > 1361451882, 'update description, classifiers'], ['autobahn_rce',
    > '0.5.9', 1361451956, 'new release'], ['autobahn_rce', '0.5.9',
    > 1361451971, 'add source file autobahn_rce-0.5.9.tar.gz']]
    >
    > I don't think there's way to get older chunks of the changelog though.
    > What would you need those for?
    >
    > If you need the entire changelog, just download it once (it's not that
    > large, barely 40MB). Here it is, up until 1361452402 (now):
    >
    > http://phihag.de/2013/pypi-changelog-2013-02-20.json.bz2
    >
    > What I'd like is a real-time push service of changelog entries, but I'm
    > not certain that would be scalable.
    >
    > Cheers,
    >
    > Philipp
    >
    >
    > On 02/18/2013 02:16 AM, Gregg Caines wrote:
    > > Hey all,
    > >
    > > I'm trying to write a script that tracks changes on pypi, and I've come

    > across the xmlrpc interface, specifically the 'changelog' api. It's
    > definitely what I'm looking for, but I get an absolutely massive xml
    > response from it at once and I was hoping there might be either some way to
    > "page" through it with mulitple requests, or a different-but-similar API.
    > >
    > > Thanks in advance,
    > > Gregg

    >
    >
    >
    > --
    > http://mail.python.org/mailman/listinfo/python-list
    >
    >
    Michael Herman, Feb 21, 2013
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ian Pilcher

    Changelog for 1.5.0_05?

    Ian Pilcher, Sep 19, 2005, in forum: Java
    Replies:
    4
    Views:
    325
    Ian Pilcher
    Sep 20, 2005
  2. Jeremy Fincher

    Searching PyPI?

    Jeremy Fincher, Oct 19, 2003, in forum: Python
    Replies:
    2
    Views:
    344
    Jeremy Fincher
    Oct 21, 2003
  3. Aroldo Souza-Leite

    PYPI:(error 451)

    Aroldo Souza-Leite, Jul 8, 2004, in forum: Python
    Replies:
    1
    Views:
    329
    richard
    Jul 8, 2004
  4. gert

    http://pypi.python.org/pypi

    gert, Apr 29, 2010, in forum: Python
    Replies:
    3
    Views:
    409
    Martin v. Loewis
    May 1, 2010
  5. J. D.
    Replies:
    3
    Views:
    164
    Michael Neumann
    Nov 26, 2004
Loading...

Share This Page