aboutsummaryrefslogtreecommitdiff
path: root/api.py
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2021-06-05 18:46:08 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2021-06-05 18:46:08 +0530
commit167befc8ed6fd8e327b4554f6716bbc1d7f3531b (patch)
tree41f38a0c6d794c4e975328acce99f6ea5decbc7c /api.py
parentf8b29478f5481b39225d77b630049f759a572ce7 (diff)
added FastAPI support
Diffstat (limited to 'api.py')
-rw-r--r--api.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/api.py b/api.py
new file mode 100644
index 0000000..35f902c
--- /dev/null
+++ b/api.py
@@ -0,0 +1,11 @@
+from app import app as flask_app
+from fastapi import Body, FastAPI
+from fastapi.middleware.wsgi import WSGIMiddleware
+from pydantic import BaseModel
+
+
+app = FastAPI(title="SaaS-in-a-Flask",description="Sample API", version="0.1")
+
+from app import apis
+
+app.mount("/", WSGIMiddleware(flask_app))