python-sunlight example

This commit is contained in:
Paul Tagliamonte 2012-12-18 23:55:50 -05:00
parent 196bd8cf98
commit 9c58c196c8

14
eg/ma-legs.hy Normal file
View File

@ -0,0 +1,14 @@
; vim: tabstop=2 expandtab shiftwidth=2 softtabstop=2 filetype=lisp
; Copyright (c) Paul Tagliamonte, in sofar as any of this is at all
; copyrightable.
(import ["sunlight"])
(foreach
(kwapply (sunlight.openstates.legislators) {"state" "ma"})
(fn [x] (print [
(get x "first_name")
(get x "last_name")
(get x "party")
])))