1. from fastapi import FastAPI
  2. from pydantic import BaseModel
  3. class Person(BaseModel):
  4.     name: str
  5.     born_at: int
  6.     based_in: str
  7.     skills: list[str]
  8.     socials: dict[str, str]
  9. ivart = Person(
  10.     name="Artem Ivanov",
  11.     born_at=899884800, # 🎂 July 8th
  12.     based_in="Paris, 🇫🇷",
  13.     skills=["Python", "PostgreSQL", "FastAPI", "Docker", "Kubernetes", "AWS"],
  14.     socials={
  15.         "tg": "https://ivart.t.me/",
  16.         "gh": "https://github.com/ivanovart",
  17.         "in": "https://www.linkedin.com/in/ivart",
  18.     },
  19. )
  20. app = FastAPI()
  21. @app.get("/me")
  22. def get_me() -> Person:
  23.     return ivart
  24. if __name__ == "__main__":
  25.     import uvicorn
  26.     uvicorn.run(app)