Skip to content

Instantly share code, notes, and snippets.

Last active May 12, 2023 09:52
What would you like to do?
Basic FastAPI app
# Run using `uvicorn simple_app:app --reload`
# Visit for documentation and testing the API
from fastapi import FastAPI, Query
app = FastAPI(
title="FastAPI Example",
description="### Hello world",
@app.get("/echo/", tags=["APIs"], response_model=str)
def echo(input_value: str = Query(..., max_length=20)):
return input_value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment