Skip to main content

Get current parliament bills from Australian governments.

Project description

Aus Bills

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

Install via pip

pip install ausbills

Current governments that are supported:

  • Australian Federal Government

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 get_all_bills, Bill
all_bills = get_all_bills()
print(all_bills)
bill_five = all_bills[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)
print(bill.bill_text_links)
print(bill.explanatory_memoranda_links)

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

bill = Bill(bill_five["url"])

or the id

bill = Bill(bill_five["id"])

You may also change the date format:

bill = Bill(bill_five["id"],"DD/MM/YYYY")

and you can get the data dump as a dict:

bill.data

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.


Upgrade package

Change VERSION in setup.py, then:

git tag -a 0.1.0 -m "update version 0.1.0"
git push origin 0.1.0

Todo

  • Write better usage docs

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.2.3.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

ausbills-0.2.3-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file ausbills-0.2.3.tar.gz.

File metadata

  • Download URL: ausbills-0.2.3.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for ausbills-0.2.3.tar.gz
Algorithm Hash digest
SHA256 52aef37b6610a127b1a9ef1bf44471e263a4c5c3d080a6477e8dd2d08503cf50
MD5 1e8cee11eb614f357b6fe81ac7fdb88e
BLAKE2b-256 4c3f5b6d7acdc34fba7a12367b01acf9af7c3d7b2a6bbf1aba7e1b2794b9abe3

See more details on using hashes here.

File details

Details for the file ausbills-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: ausbills-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for ausbills-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d773b71d9a6fa5196571ea960edd7e325127d8ddabc5b578394ee477f04aa7a0
MD5 a288ec64fc6c8de7c2539b35b06e0032
BLAKE2b-256 dce38a20c75d306d7b7e7a578a049be0de33cac1dcc2f54bba5cba895e8beab9

See more details on using hashes here.

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