Politico python version is a spin off of my initial project Politico. This Project rebuilds the backend application with new technologies.
- Politico-React - Frontend Application of the politico application. Built with React
- Politico-Api-Node-Version - Initial version of the politico application. Built with Javascript
- Users can sign up.
- Users can login.
- Admin can create political office
- Admin can create political party
- Authenticated users can query all parties
- Authenticated users can query for a party
- Authenticated users can query all offices
- Authenticated users can query an office
- Admin can delete a party
- To view docs follow the setup steps for the application
- visit localhost/politico on you browser
- docs would be on the top right corner
Via Cloning The Repository
# Clone the app
git clone https://github.com/vic3king/Politico-python.git
# Setup Env
Follow the format specified in the .env example
# Switch to directory
cd Politico-python
# Create virtual env(make sure you have birtualenv installed)
virtualenv --python=python3 venv
# Activate virtual env
source venv/bin/activate
# Install Package dependencies
pip install -r requirements.txt
# create and setup .env file according to .env.exampl
# Run migrations
python manage.py db migrate
python manage.py db upgrade
#Start the application
python3 manage.py runserver
#View the application
navigate to localhost:3000 to view the application
- Running Tests
- To run tests and observe test coverage for various versions of python . Run the command below.
tox
- To run and check for test coverage. Run the command below:
pytest -v --cov
- To obtain coverage report. Run the command below:
coverage report
- To obtain html browser report. Run command below:
coverage html
A folder titled html_coverage_report will be generated. Open it and copy the path of index.html and paste it in your browser.
- Python-Flask Flask is a microframework for Python based on Werkzeug, Jinja 2 and good intentions
- GraphQl GraphQL is a new API standard that provides a more efficient, powerful and flexible alternative to REST.
- SQLAlchemy SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL.
- Alembic Alembic is a lightweight database migration tool for usage with the SQLAlchemy Database Toolkit for Python.
- pep8 - Linter Tool To run pep8 and ensure youre following the style guide
run flake8 --statistics
Project is currently being managed with Pivotal Tracker, a project management tool. You can find the stories on the politico Pivotal Tracker Board
- Akaniru victory - Initial work - Vic3king if you've read this far... Leave a star โญ๏ธ
See also the list of contributors who participated in this project.