See https://github.com/Abiaina/PeoplePowerProductToPolitics/tree/master/ProductToPolitics
Last reconfigured API to use Python3 and containerized it using Docker on 4/5/2020.
API that takes barcode numbers and returns the company that owns this product.
Implemented with Python 3.7.4, Flask, and [external database][data-sources) .
Scan any product's barcode to learn about the political implications of your purchases.
pip install -r requirements.txt
python src/api.py
- Visit API's Homepage on http://127.0.0.1:5000/ .
- Post to API for political data, run
curl -X POST "http://127.0.0.1:5000/api/v2/get_politics"
- docker build .
- docker run -p 5000:5000 -i
- Visit API's Homepage on
http://0.0.0.0:5000/
. - Post to API for political data, run
curl -X POST "http://0.0.0.0:5000/api/v2/get_politics"
Get API keys and store them as environment variables. The config file expects OSKEY for Open Secrets API Key.
Open Secrets API provided the financial-political actions of any large corporations. Reach out to [email protected] directly or ask questions in the group: [email protected]. Learn more here: https://www.opensecrets.org/resources/datadictionary/UserGuide.pdf .