Skip to content

Instantly share code, notes, and snippets.

@sreeharibs
Created July 16, 2024 17:33
Show Gist options
  • Save sreeharibs/bd9bac4d47f3936acb8c2d618893ef0a to your computer and use it in GitHub Desktop.
Save sreeharibs/bd9bac4d47f3936acb8c2d618893ef0a to your computer and use it in GitHub Desktop.
from random import randint
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
async def root():
# cust_id, risk_score [1-100]
risk_data = [
{"customer_id": randint(1, 10000), "risk_score": randint(1, 100)}
for _ in range(1000)
]
return risk_data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment