#pip install fastapi #pip install uvicorn import redis from fastapi import FastAPI,Form, Request import json import uvicorn import zipfile app = FastAPI() @app.get("/getbtn") def read_root(request: Request): r = redis.Redis(host='db.ptt.cx', port=6379, db=2,password='choozmo9') data=r.get('btn_data') return {'data':data} if __name__ == "__main__": uvicorn.run("main:app", host="0.0.0.0", port=9898)