David Janes' Code Weblog

October 30, 2008

GenX – first public demonstration

genx,ideas,pyecs · David Janes · 2:37 pm ·

This is a post using my next project, called GenX which I’ll be describing in the next few weeks. Here’s a some information about a band called U2. I just bought a reissued CD/DVD combo of Under a Blood Red Sky, so it seems appropriate. (Note: post updated)

poster

U2

U2 are a rock band from Dublin, Ireland. The band consists of Paul David Hewson (vocals and guitar), The Edge (guitar, keyboards, and vocals), Adam Clayton (bass guitar) and Larry Mullen, Jr. (drums and percussion)….

poster

Paul David Hewson

Paul David Hewson (born 10 May 1960 in Glasnevin, Dublin, Ireland), also known by his stage name Bono, is the main vocalist of the Irish rock band U2. Bono was born and raised in Dublin, Ireland, and attended…

poster

The Edge

David Howell Evans (born 8 August 1961 in Barking, East London, UK), more widely known by his moniker The Edge, is a musician known best as the guitarist, keyboardist, and main backing vocalist for the…

poster

Adam Clayton

Adam Charles Clayton (born 13 March 1960 in Chinnor, Oxfordshire, UK), is the bassist of the rock band U2. A British citizen, Clayton has resided in County Dublin since the time his family moved to Malahide…

poster

Larry Mullen, Jr.

Lawrence Joseph “Larry” Mullen, Jr. (born 31 October 1961 in Artane, Dublin, Ireland) is the drummer for the Irish rock band U2. He is the founder of U2, which was originally known as “The Larry Mullen…

poster

Under a Blood Red Sky – Deluxe Edition CD/DVDU2 [2008-07-10]

A Deluxe Edition version featuring the Under a Blood Red Sky CD (Disc 1) and the Live at Red Rocks DVD (Disc 2). The remastered Under a Blood Red Sky album was originally released in November 1983, and consists of live recordings from three shows on the band’s War Tour through Europe and America. Recorded at the Red Rocks Amphitheatre in Colorado on 5th June 1983, Live at Red Rocks will be available for the first time on DVD, and will include 5 previously unreleased songs, a director’s commentary, digitally re-graded pictures and a 5.1 mix. This is the fourth CD as part of the Amazon.com-exclusive U2 deluxe edition box set and fits into the open slot within the packaging.

October 19, 2008

PyECS – the Python Amazon ECS API

pyecs,python · David Janes · 4:24 pm ·

While working on another project (announcement soon) I discovered that the “pyamazon” API to Amazon E-Commerce Services no longer works (update: and is now called Amazon Associates Web Service). As I’m looking for a way to look up authors and books on Amazon, I decided to have a look at project and what was wrong.

As it turns out, the Amazon API has undergone quite a bit of evolution in the last few years and the old API has been abandoned. I initially tried to upgrade Mark Pilgrim and Mike Josephson‘s code but after a few minutes I decided a new, more class and iterator-oriented approach would be better.

After a few hours of coding, here’s the result: the PyECS project on Google Code. There’s no tarball or setup.py yet, but we’ll put that together soon. If you want to help, hey, leave a comment.

I’ve only implemented a few lookups, though the general “iter” method will pretty well get anything you want just by passing in a couple of parameters.

Here’s an example of how to use it to look up of all of U2′s albums:

    a = ecs.AmazonECS(AccessKeyID = 'YOUR_AMAZON_ECS_LICENSE_KEY')
    for d in a.iterMusicByArtist('U2'):
        pprint.pprint(d)

That’s all there is to it: no need to worry about what page of results or whatever you are on. The results are returned as a Python dictionary of lists, dictionaries, and strings: the usual JSON-like thing. If you want an exact transcription of the XML objects, that’s available but by default we do a little compression to make the results more usable.

Powered by WordPress

Switch to our mobile site