fastapi/path-converter

Path Type Converter

Convert path parameters

parameters
validation

Explanation

Uses path converters to match complex URL patterns

Examples

Accept file paths

@app.get("/files/{file_path:path}")
  def read_file(file_path: str):
      return {"file_path": file_path}