Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


REST API Development with FastAPI filter_list
Author
Message
REST API Development with FastAPI #1
from fastapi import FastAPI

app = FastAPI()

@app.get("/")
def read_root():
return {"message": "Hello, World!"}

@app.get("/items/{item_id}")
def read_item(item_id: int, query_param: str = None):
return {"item_id": item_id, "query_param": query_param}

Reply







Users browsing this thread: 1 Guest(s)