CRUD API de atleta e seus treinos
A API foi desenvolvida utilizando o fastapi
(async), junto das seguintes libs: alembic
, SQLAlchemy
, pydantic
. Para salvar os dados está sendo utilizando o postgres
, por meio do docker
.
Para executar o projeto, utilizei a pyenv, com a versão 3.11.4 do python
para o ambiente virtual.
Caso opte por usar pyenv, após instalar, execute:
pyenv virtualenv 3.11.4 workoutapi
pyenv activate workoutapi
pip install -r requirements.txt
Para subir o banco de dados, caso não tenha o docker-compose instalado, faça a instalação e logo em seguida, execute:
make run-docker
Para criar uma migration nova, execute:
make create-migrations d="nome_da_migration"
Para criar o banco de dados, execute:
make run-migrations
Para subir a API, execute:
make run
e acesse: http://127.0.0.1:8000/docs