fastapi-postgresql-crud
This is a simple CRUD application using FastAPI and PostgreSQL.
Installation
pip install -r requirements.txt
Usage
uvicorn main:app --reload
chmod +x project/entrypoint.sh
docker-compose up -d --build
docker-compose logs web
docker-compose exec web-db psql -U postgres
\c web_dev \dt select * from customer; (If generate_schemas=True table exists)
Initialize the database:
docker-compose exec web aerich init -t app.db.TORTOISE_ORM
docker-compose exec web aerich init-db
docker-compose exec web python -m pytest
autopep8 --in-place --aggressive --aggressive project/app/*.py -v