Junaidb commited on
Commit
443a7c7
·
verified ·
1 Parent(s): a759870

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +41 -0
app.py CHANGED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI,Request,HTTPException,Response
2
+ from typing import Optional
3
+ from fastapi.responses import JSONResponse
4
+ from fastapi.middleware.cors import CORSMiddleware
5
+
6
+
7
+
8
+
9
+ origins=["*"]
10
+
11
+ app=FastAPI()
12
+
13
+ app.add_middleware(
14
+ CORSMiddleware,
15
+ allow_origins=origins,
16
+ allow_credentials=True,
17
+ allow_methods=["*"],
18
+ allow_headers=["*"],
19
+ )
20
+
21
+
22
+ class PPD(BaseModel):
23
+
24
+ name:str
25
+ registration_number:str
26
+ phone_number:str
27
+ address:str
28
+ aadhar:str
29
+ parentage:str
30
+ total_ponies:str
31
+ stand:str
32
+ license:bool
33
+ renewal:bool
34
+
35
+
36
+
37
+ @app.post("/dataingestion")
38
+ async def Ingest(request:PPD):
39
+ pass
40
+
41
+