It can be difficult to keep on top of all national legislation, but BLZ makes it easier. With the BLZ app, you can access a dashboard which shows you all your state's senators and representatives, so you can see what legislation they have sponsored recently. You can also browse legislation by policy area and specify a date range that you would like to search by. You can easily save bills to your dashboard so you can keep tabs on them, and quickly access information about their most recent updates. You can also move from any bill on the app, to the bill's page on the official congress website so you can learn more.
You will need python3 and pip3 installed for this project. You will also need to setup a Postgres Database for the app.
-
Get a free API key from ProPublica
https://www.propublica.org/datastore/api/propublica-congress-api
-
Clone the repo.
https://github.com/erikamanning/capstone1.git
-
Create a virtual environment in the project directory.
$ python3 -m venv venv
-
Start the virtual environment.
$ source venv/bin/activate
-
Install required packages.
$ pip3 install requirements.txt
-
Open the secrets.py file and add your API key and Flask Secret Key in the fields specified below. Make sure to add secrets.py tp your .gitignore so your personal API key doesn't get shared accidentally.
In secrets.py
API_SECRET_KEY = os.environ.get('SECRET_API_KEY', '##NOT A KEY##') FLASK_SECRET_KEY = os.environ.get('SECRET_KEY', '##NOT A KEY##')
You will need to set up a postgres database for this application. Once that is done you can move to the next step.
-
Initialize the database.
$ flask init_app
-
Set the environment to development mode.
$ export FLASK_ENV=development
-
Run the app.
$ flask run
-
Open web browser and run the app on the port for your server.
This project owes much to ProPublica's Congress API. All congressional data was obtained through the ProPublica Congress API.