Skip to content

Instantly share code, notes, and snippets.

@kagermanov27
Created May 19, 2022 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kagermanov27/e5bc0e373fa6b8dbd9883870c4159db7 to your computer and use it in GitHub Desktop.
Save kagermanov27/e5bc0e373fa6b8dbd9883870c4159db7 to your computer and use it in GitHub Desktop.
from fastapi import FastAPI
from add import Download, Query
app = FastAPI()
@app.get("/")
def read_root():
return {"Hello": "World"}
@app.post("/add/")
def create_query(query: Query):
## Create unique links
serpapi = Download(query)
serpapi.download_all_images()
return {"status": "Complete"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment