Giter VIP home page Giter VIP logo

politicov2's Introduction

Politico Build Status Coverage Status Maintainability

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

Getting Started

  1. Clone the repository by doing: git clone https://github.com/mimipeshy/Politicov2.git

  2. Create a virtual environment: virtualenv env

  3. Activate the virtual environment: source venv/bin/activate on Linux/Mac or source venv/Scripts/activate on windows.

  4. Install the requirements : pip install -r requirements.txt

Running tests

Export enviroment settings: source ./.travis.sh Use pytest to run: pytest --cov=app

Prerequisites

  • python 3.6
  • virtual environment

Running it on machine

  • Create a .env file to store your environment variables: touch .venv
  • On terminal do: source venv/bin/activate on Linux/Mac or source venv/Scripts/activate on windows
  • Run the application: python run.py
  • The api endpoints can be consumed using postman.

Endpoints

Endpoint FUNCTIONALITY
POST /api/v2/party CREATE political party
GET /api/v2/party GET ALL political parties
GET /api/v2/party/int:id GET ONE political party
DELETE /api/v2/party/int:id DELETE ONE political party
PATCH /api/v2/party/int:id/name UPDATE ONE political party
POST /api/v2/office CREATE government office
GET /api/v2/office/int:id GET ONE government office
GET /api/v2/office GET ALL government offices
POST /api/v2/auth/signup CREATE a new user
POST /api/v2/auth/login LOGS in a new user
POST /api/v2/office/register ADD candidate to political office
POST /api/v2/votes ALLOWS voter to vote
GET /api/v2/office/int:id/result GET results of votes casted

Built With

  • Flask-Api - The web framework used
  • Pip - Dependency Management

Authors

  • Peris Ndanu

License

This project is licensed under the MIT License

politicov2's People

Contributors

mimipeshy avatar

Watchers

James Cloos avatar Chege Brian avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.