From cf833991829b9143e5e8b0f81c051f54c320bc79 Mon Sep 17 00:00:00 2001 From: cspark Date: Mon, 15 Apr 2024 16:04:19 +0100 Subject: [PATCH] Init backend --- main.py | 14 ++++++++++++++ requirements.txt | 12 ++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 main.py create mode 100644 requirements.txt diff --git a/main.py b/main.py new file mode 100644 index 0000000..cb7d2d2 --- /dev/null +++ b/main.py @@ -0,0 +1,14 @@ +from typing import Union + +from fastapi import FastAPI + +app = FastAPI() + + +@app.get("/") +def root(): + return {"Hello": "World"} + +@app.get("/api") +def root(): + return {"Hello": "API!"} diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..52226e5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,12 @@ +annotated-types==0.6.0 +anyio==4.3.0 +click==8.1.7 +fastapi==0.110.1 +h11==0.14.0 +idna==3.7 +pydantic==2.7.0 +pydantic_core==2.18.1 +sniffio==1.3.1 +starlette==0.37.2 +typing_extensions==4.11.0 +uvicorn==0.29.0