Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
from fastapi import FastAPI
from datetime import date
from pydantic import BaseModel

class P(BaseModel):
message: str
currentdate: str

app = FastAPI()

@app.get("/{path}")

async def root(path : str):
if path == "hello":
return "Hello you"
d = date.today()
return {"message": "Hello you", "current date": d}