Skip to main content

Get parliament bills for Australian governments.

Project description

Aus Bills

This is a package is for obtaining parliament bills for Australian governments.

Install via pip

pip3 install git+https://github.com/KipCrossing/Aus-Bills

Current governments that are supported:

  • Australian Federal Government

Contributing

We use BeautifulSoup to scrape the bills from the Bills websites. so make sure you become familiar with the docs here.

Fork the repo and install requirements

pip3 install -r requirements.txt

Each state should their own bills and corresponding website. Add a python file for a new state in the /ausbills dir. the python file should have the naming convention: wa_parliment.py for Western Australia for example. Make sure we all agree on method/object/output conventions (use federal_bills as a guide). Once you are happy, update the README on method usage and make a Pull Request.

Australian Federal Government

This module had methods for scraping the Australian Federal Parliament website, using beautiful soup.

The bills are scraped to get data from both the house and the senate:

from ausbills.federal_parliment import all_bills, Bill
print(all_bills)
bill_five = all_bills.data[5]

all_bills.data is a list of all current bills and some basic data in the form of a dict. The rest of the data may be obtained via the Bill() object.

bill = Bill(bill_five)
print(bill.summary)
print(bill.sponsor)
bill.bill_text_links
bill.explanatory_memoranda_links

or you can use the url string to create an instance of Bill():

bill = Bill(bill_five["URL"])

and you can get the data dump as a dict:

bill.data

Todo

  • get second reading debate links
  • get third reading links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ausbills-0.0.7.tar.gz (5.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page