Politico enables citizens give their mandate to politicians running for different government offices while building trust in the process through transparency.
- Home page
- Create an account
- Login into your account
- Post a question
- Fetch all questions
- Fetch a single question
- Edit a specific question
- Delete a specific question
- Post an answer to a question
- Python 3.6 version
Downlaod / clone the project to your local computer by:
- Download the zip file of this repository.
- Unzip it and navigate into the Politico_back_end directory.
Create a virtual environment
$ virtualenv venv
Activate the environment
$ venv/bin/activate
Install package requirements to your environment
$ pip install -r requirements.txt
Create a.env file in your Politico_back_end root directory and add:
-
$ venv/bin/activate
-
$ export FLASK_APP="run.py"
-
$ export SECRET="any-character-or-STRING-YOU-PREFER"
-
$ export APP_SETTINGS="development"
To set up testing environment
-
$ pip install pytest
-
$ pip install coverage
Test | Endpoints | HTTP VERBS |
---|---|---|
Create a political party | /api/v1/party | POST |
Get all political parties | /api/v1/party | GET |
Get a specific political party | /api/v1/ | GET |
Edit a specific political party | /api/v1//party | PUT |
Delete a particular party | /api/v1/party | DELETE |
Create a political office | /api/v1/office | POST |
Get all political offices | /api/v1/office | GET |
Get a specific political office | /api/v1/office | GET |
The API is hosted on Heroku
Andela Bootcamp - cohort 37