python bindings

15 views
Skip to first unread message

Christopher Nilsson

unread,
Dec 14, 2014, 12:12:40 PM12/14/14
to openaust...@googlegroups.com
Hi folks,

I've uploaded a first attempt at some python bindings for the openaustralia api.

https://pypi.python.org/pypi/openaustralia

Links to source, docs, etc are there.  It sticks closely to what I've seen from the other php & ruby bindings on your site.


It's flagged as an alpha at the moment, so if there are any pythonistas out there who are interested, you can give it a try like so:

$ pip install --pre openaustralia

(The --pre allows python to install the alpha packages...)


Then the usual stuff can happen:

In [2]: from openaustralia.api import OpenAustralia

In [3]: oa = OpenAustralia(key)

In [4]: mps = oa.get_representatives(postcode='2010')

In [5]: mps
Out[5]:
[{u'constituency': u'Sydney',
  u'entered_house': u'1998-10-03',
  u'entered_reason': u'general_election',
  u'first_name': u'Tanya',
  u'full_name': u'Tanya Plibersek',
  u'house': u'1',
  u'image': u'/images/mpsL/10513.jpg',


... etc...


Anyways, any feedback, votes against, feel free.

Cheers,
Chris.

Henare Degan

unread,
Dec 14, 2014, 7:39:40 PM12/14/14
to openaustralia-dev
Awesome stuff Chris!

Are you using this on a project?

Cheers,

Henare

--
Henare Degan
hen...@oaf.org.au
Volunteer | Worker | Director - OpenAustralia Foundation - @OpenAustralia

--
You received this message because you are subscribed to the Google Groups "OpenAustralia Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openaustralia-...@googlegroups.com.
To post to this group, send email to openaust...@googlegroups.com.
Visit this group at http://groups.google.com/group/openaustralia-dev.
For more options, visit https://groups.google.com/d/optout.

Christopher Nilsson

unread,
Dec 14, 2014, 9:29:54 PM12/14/14
to openaust...@googlegroups.com
Hey Henare,

Only vague ideas right now.  Basically, I caught the radio segment, on fbi about theyvoteforyou not so long ago, and was feeling keen. :)

This was mostly an excersize in familiarising myself with the framework in place, etc. 

As time allows, I'll have a poke around the github issue list and see if there's anything I can help out with. 
Can likely help with the PHP side of things, but I'm lacking Ruby knowledge (hence the python binding).

Any particular tags / tickets that'll be useful for a newbie to start looking at?

Henare Degan

unread,
Dec 15, 2014, 12:42:12 AM12/15/14
to openaustralia-dev
That's so brilliant! I'll have a think about things you might be interested in working on. In the mean time...

If you're in Sydney and free tonight you should definitely come along for a drink and a chat: http://www.meetup.com/OpenAustralia-Foundation/events/219147060/

I'll also invite you to our chat room.

Cheers,

Henare
Reply all
Reply to author
Forward
0 new messages