Creating stubs and defining schemas

This commit is contained in:
2023-01-11 17:05:39 +01:00
commit c8d8bf9cb6
3 changed files with 67 additions and 0 deletions

23
back/schemas.py Normal file
View File

@@ -0,0 +1,23 @@
from pydantic import BaseModel
class PeopleCreate(BaseModel):
name: str
age: int
gender: str
country: str
class AverageAgeByCountry(BaseModel):
country: str
average_age: float
class CountByCountry(BaseModel):
country: str
people_count: int
class GenderRepartition(BaseModel):
female_proportion: float
male_proportion: float