This project implements an API for managing age groups and processing enrollments.
-
Register a new age group
- POST
/age-groups/
- Request Body:
{ "min_age": 10, "max_age": 15 }
- POST
-
Delete an age group
- DELETE
/age-groups/{age_group_id}
- DELETE
-
View existing age groups
- GET
/age-groups/
- GET
-
Request enrollment
- POST
/enrollments/
- Request Body:
{ "name": "Maria", "age": 21, "cpf": "12345678900" }
- POST
-
Check enrollment status
- GET
/enrollments/{enrollment_id}/status
- GET
-
View existing enrollment
- GET
/enrollments/
- GET
- Clone this repository:
git clone https://github.com/montenegroleticia/AgeEnrollmentAPI.git
- Copy the example environment file and configure the environment variables:
cp .env.example .env
- Build:
docker compose build
- Run API and DB:
docker compose up
- Access aplication:
localhost:8000
- Run tests with pytest:
docker compose run api pytest
- Run lint with flake8:
docker compose run api flake8