diff --git a/main.py b/main.py index 69244c4..d998f13 100644 --- a/main.py +++ b/main.py @@ -1,4 +1,10 @@ from fastapi import FastAPI +from datetime import date +from pydantic import BaseModel + +class P(BaseModel): + message: str + currentdate: str app = FastAPI() @@ -6,4 +12,6 @@ async def root(path : str): if path == "hello": - return "Hello you" \ No newline at end of file + d = date.today() + return {"message": "Hello you", "current date": d} +