client.py 346 B

123456789
  1. from fastapi import FastAPI
  2. from fastapi.responses import FileResponse
  3. app = FastAPI()
  4. @app.get("downloadUpdate/{branch}/{version}/{os}/{file}")
  5. async def downloadUpdate(file: str, branch: str,version: str,os: str):
  6. return FileResponse(path=f'{branch}/{version}/{os}/{file.filename}', filename=file.filename, media_type='text/yml')