File size: 306 Bytes
496ed86
 
 
 
132c4fb
496ed86
 
 
132c4fb
496ed86
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from fastapi import FastAPI, File, UploadFile
from fastapi.responses import StreamingResponse
import os
import io
temp = open("t.txt","w")
temp.write("aaaaaaaaaaaaa")
temp.close()

temp = open("t.txt","r")

app = FastAPI()




@app.get("/sample")
def read_root():
    return {"message": str(temp.read())}