pythonpanama / python-panama-backend

This project contains a REST API for performing CRUD operations on the Python Panama group's website database. The project was built with Flask, using SQLAlchemy, Marshmallow, and JWT_Extended.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome to Python Panama REST API πŸ‘‹

Documentation Maintenance Coverage License: MIT Twitter: JavierFeliuA

About

This project contains a REST API for performing CRUD operations on the Python Panama group's website database.

The project was built with Flask, using SQLAlchemy, Marshmallow, and JWT_Extended. For testing, we used UnitTest.

Install

To use the project in your development machine, clone it, and go to the project's root:

git clone https://github.com/pythonpanama/python-panama-backend.git
cd python-panama-backend

To run the development and the testing databases, go to the postgresql directory and run docker-compose:

cd postgresql
docker-compose up --build -d

Go back to the project's root:

cd ..

From the project's root, create and activate your virtual environment:

python3 -m venv venv
. venv/bin/activate

And install the project's dependencies:

pip install -r requirements.txt

Development

Familiarize yourself with the codebase and modify as needed. Important packages and modules are:

  • app.py Contains the Flask application factory.
  • auth.py Uses flask_jwt_extended for fine-grained authentication/authorization.
  • config.py Contains the configuration classes.
  • models/ Contains the SQLAlchemy models.
  • resources/ Contains the API resources and endpoints.
  • schemas/ Contains the Marshmallow schemas.
  • tests/ Contains the UnitTests.

Push your changes to the dev branch

git push origin dev

I will merge your changes with the main branch after reviewing them.

Tests

To insure code quality, please add relevant tests for all production code additions/modifications.

Make sure the virtual environment is activated before running the tests.

To run the tests use:

python -m unittest tests/**/*

If you wish to run the tests with coverage, use instead:

coverage run -m unittest tests/**/*

The included tests provide 99% coverage for the codebase. You can find the coverage report here.

Mantainer

πŸ‘€ Javier Feliu

Show your support

Give a ⭐️ if this project helped you!

πŸ“ License

This project is MIT licensed.


This README was generated with ❀️ by readme-md-generator

About

This project contains a REST API for performing CRUD operations on the Python Panama group's website database. The project was built with Flask, using SQLAlchemy, Marshmallow, and JWT_Extended.

License:MIT License


Languages

Language:Python 99.7%Language:HTML 0.1%Language:CSS 0.1%Language:Shell 0.0%Language:Dockerfile 0.0%