Skip to content

Politico enables citizens give their mandate to politicians running for different government offices while building trust in the process through transparency.

Notifications You must be signed in to change notification settings

belio39/politico_back-end

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Coverage Status Maintainability

politico_back-end

Politico enables citizens give their mandate to politicians running for different government offices while building trust in the process through transparency.

Usage

  • 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

Prerequisities

  • Python 3.6 version

Installation

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.

Virtual environment

Create a virtual environment

$ virtualenv venv

Activate the environment

$ venv/bin/activate

Dependencies

Install package requirements to your environment

$ pip install -r requirements.txt

Env

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"

Testing

To set up testing environment

  • $ pip install pytest

  • $ pip install coverage

Testing API endpoints

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

Resources

The API is hosted on Heroku

Authors

Dennis rotich Belio

Acknowledgement

Andela Bootcamp - cohort 37

About

Politico enables citizens give their mandate to politicians running for different government offices while building trust in the process through transparency.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages