A Flask starter application with Auth, logging, db and CI/CD covered.
- Language: Python 3.8+
- Application Framework: Flask
- Application Server: uWSGI
- Web Server: NGINX
- Database: PostgreSQL
The following libraries will be used for building the application.
- API Endpoints: Flask-Classful
- ORM: Flask-SQLAlchemy (SQLAlchemy)
- DB Migrations: Flask-Migrate (Alembic)
- Serialization: Marshmallow
- Testing: pytest
heavyweight
│
│ flask/
│ │
│ │ app/
│ │ │ auth/
│ │ │ status/
│ │ │ ...
│ │ │ ...
│ │ └───────
│ │ config/
│ │ │ local
│ │ │ prod
│ │ │ ...
│ │ └───────
│ │ migrations/
│ │ tests/
│ │ │ unit/
│ │ │ integration/
│ │ │ ...
│ │ └───────
│ │ requirements.txt
│ │ Dockerfile
│ │ entrypoint.sh
│ │ setup.cfg
│ └────────────────────────
│ nginx/
│ Postgresql/
│ entrypoint.sh
│ requirements.txt
│ docker-compose.yml
└────────────────────────
-
System requirements
- Docker desktop
- Python 3.8
-
Install required packages
# create virtual env
cd flask/
python3 -m venv env
# Activate the environment
source ./env/bin/activate
# Install packages
pip3 install -r requirements.txt
- Modularize various components
- Auth, Logging and DB should be configured