FastAPI - Path Parameters - str
from fastapi import FastAPI
app = FastAPI()
@app.get("/user/{user_name}")
async def root(user_name: str):
return {'msg': f"user '{user_name}'"}
http://localhost:8000/user/foobar
http://localhost:8000/user/foo bar
http://localhost:8000/user/ - 404