Boilerplate for Python using Clean Architecture
- Python version 3.8+
- pip (package manager for Python), included since Python 3.4.
- virtualenv (tool to create isolated Python environments)
Install virtualenv:
python3 -m pip install virtualenv
Create isolated Python environments using virtualenv:
virtualenv -p /usr/local/bin/python3 env
Activate virtual environment:
source env/bin/activate
Install dependencies:
python3 -m pip install -r requirements.txt
Environment variables:
cp env.example .env
Database schema is available on /schemas/database/ directory, for this example we will be using PostgreSQL.
make run
By default it will listen on http://0.0.0.0:8001
Install requirement for test:
python3 -m pip install -r requirements/test.txt
Then run:
make test
make coverage
make lint
If you working on new module and too lazy to create the structure one by one, you can use generator:
python3 gawekno.py sales v1