from fastapi import FastAPI import requests app = FastAPI() @app.get("/") def greet(): return requests.get("https://ipinfo.io/").json()