A Python library to interact with the Georgia General Assembly website API
Inspired by greencracker. Major thanks to her legis.ga.gov API endpoint discovery
pip install GGA
- Import the module with
from GGA import gga
at the top of your Python script(s)
from GGA import gga
assemby = gga.GeneralAssembly()
legislation = assembly.getLegislationByTypeAndNumber('HB','2')
vote = assembly.getVote(1804)
member = assembly.getMember(179)
session = assembly.sessions['2019-2020 Regular Session']
members = session.getMembers()
legislationItems = session.getLegislationItems()
committees = session.getCommittees()
vote = legislation.getVotes()
committees = legislation.getCommittees()
committeeMember = committees[0].getMembers()[0]
memberName = committeeMember.lastName
cellPhone = committeeMember.district.cellPhone
otherCommitteesForCommitteeMember = committeeMember.getCommittees()
sessions: dictionary of Session objects, most recent first { {'Name': Session, ... } }
years: session years {JSON}
votes: dictionary of Vote objects { {'Id': Vote, ... } }
Get all Georgia General Assembly sessions (run automatically when GeneralAssembly object created, so doesn't need to be manually run)
Returns: dictionary of Session objects, most recent first { {'Name': Session, ... } }
Get all Georgia General Assembly years (run automatically when GeneralAssembly object created, so doesn't need to be manually run)
Returns: years (JSON)
Get all Georgia General Assembly votes
Returns: dictionary of Vote objects { {'Id': Vote, ... } }
Get a specific vote
Returns: Vote object {Vote}
Get a specific member
Returns: Member object {Member}
getCommittee(int committeeId, Session object (optional), Member object (optional), Legislation object (optional)):
Get a specific committee
Returns: Committee object {Committee}
getLegislation(int legislationId, Session object (optional), Member object (optional), Committee object (optional)):
Get a specific piece of legislation
Returns: Legislation object {Legislation}
Get a specific committee from a specific session
Returns: Committee object {Committee}
Get a specific piece of legislation from its bill type and number. Ex. ('HB', 280)
Returns: Legislation object {Legislation}
Id: ID number {int}
senateSchedule: Senate schedule {JSON}
houseSchedule: House schedule {JSON}
members: dictionary of Member objects { {'Id': Member, ... } }
legislationItems: dictionary of Legislation objects { {'Name': Legislation, ... } }
committees: dictionary of Committee objects { {'Code': Committee, ... } }
description: {string}
library: {string}
json: raw data of Session object {JSON}
Get the schedule of a specific chamber. Ex. ('House')
Returns: chamber schedule (JSON)
Get the session's members
Returns: dictionary of Member objects { {'Id': Member, ... } }
Get the sessions' pieces of legislation
Returns: dictionary of Legislation objects { {'Name': Legislation, ... } }
Get the sessions' committees
Returns: dictionary of Committee objects { {'Code': Committee, ... } }
Id: ID number {int}
session: Session object {Session}
currentCommittees: list of dictionaries of committees member serves on { [{'Code', Committee, 'Role'}, {}, ...] }
address: {string}
birthday: {string}
education: {string}
firstName: {string}
lastName: {string}
middleName: {string}
nickname: {string}
suffix: {string}
occupation: {string}
religion: {string}
spouse: {string}
cellPhone: {int}
contact: Contact object {Contact}
biolink: URL to biography {string}
comments: additional comments on member's profile page {string}
residence: city of residence {string}
sessions: list of sessions the member has served, most recent first { [Session, ...] }
party: member's political party {string}
legId: {int}
serviceId: {int}
chamber: what chamber the member serves in {string}
districtNumber: {int}
districtId: {int}
district: District object {District}
title: {string}
staff: staff info {HTML}
json: raw data of Member object {JSON}
Get committees the member serves on
Returns: list of dictionaries of Committee objects { [{'Code', Committee, 'Role'}, {}, ...] }
Id: ID number {int}
session: Session object {Session}
day: day of vote {string}
time: time of vote {string}
datetime: date and time of vote {datetime}
number: vote number {int}
count: {'Yeas': ... , 'Nays': ... , 'NotVoting': ... , 'Excused': ... } {JSON}
result: result of vote {string}
chamber: chamber of the vote {string}
legislation: Legislation object {Legislation}
json: raw data of Vote object {JSON}
Id: ID number {int}
session: Session object {Session}
votes: dictionary of votes for the legislation { {'Id': Vote, ...} }
committees: list of committees discussing the legislaton { [Committee, ... ] }
authors: list of dictionaries of authors of the legislation { [{'Id', Member, 'Type'}, {}, ... ] }
caption: {string}
vetoNumber: {int}
documentType: ex. 'HB' {string}
type: {string}
number: {int}
status: {JSON}
suffix: {string}
footnotes: {string}
statusHistory: {JSON}
summary: {string}
versions: {JSON}
votes: dictionary of votes for the legislation { {'Id': Vote, ... } }
json: raw data of Legislation object {JSON}
Get votes for the piece of legislation
Returns: dictionary of votes for the legislation { {'Id': Vote, ... } }
Get committees discussing the legislation
Returns: list of committees discussing the legislaton { [Committee, ... ] }
Id: ID number {int}
session: Session object {Session}
members: list of committee members { [Member, ...] }
code: shorthand code for committee {string}
name: {string}
type: {string}
description: {string}
staff: {string}
subcommittees: {JSON}
json: raw data of Committee object {JSON}
Get committee members
Returns: list of committee members { [Member, ...] }
Id: ID number {int}
coverage: {int}
post: {string}
type: {string}
number: {int}
json: raw data of District object {JSON}
cellPhone: {int}
homeNumber: {int}
address: {string}
city: {string}
email: {string}
faxNumber: {int}
phoneNumber: {int}
state: {string}
zipCode: {int}
json: raw data of Contact object {JSON}
Please leave a pull request if you would like to contribute. There are still a few methods supported by the website's API that (due to lack of documentation), I have not yet deciphered. Feel free to check out greencracker's Georgia_legislature_API_examples for details and explanation of the website's SOAP API.
Follow me on Twitter: @nwithan8
Also feel free to check out my other projects here on GitHub or join the #developer channel in my Discord server below.