From a14f4eef0f6450066a612221c808cdd9b583b5af Mon Sep 17 00:00:00 2001 From: korotkov Date: Tue, 18 Apr 2023 16:52:23 +0500 Subject: [PATCH] add base fastapi --- .vscode/launch.json | 19 +++++++++++++++++++ main.py | 8 ++++++++ requirements.txt | 1 + 3 files changed, 28 insertions(+) create mode 100644 .vscode/launch.json create mode 100644 main.py create mode 100644 requirements.txt diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..757d17b --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,19 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Python: FastAPI", + "type": "python", + "request": "launch", + "module": "uvicorn", + "args": [ + "main:app" + ], + "jinja": true, + "justMyCode": true + } + ] +} \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..d4a38ff --- /dev/null +++ b/main.py @@ -0,0 +1,8 @@ +import FastAPI + +app = FastAPI() + + +@app.get("/") +async def root(): + return {"message": "Hello World"} \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..901361c --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +FastAPI \ No newline at end of file