Skip to content

versions

get_versions()

Respond with the text/csv representation for the served versions.

Source code in optimade/server/routers/versions.py
13
14
15
16
17
18
19
20
21
22
@router.get(
    "/versions",
    tags=["Versions"],
    response_class=CsvResponse,
)
def get_versions() -> CsvResponse:
    """Respond with the text/csv representation for the served versions."""
    version = BASE_URL_PREFIXES["major"].replace("/v", "")
    response = f"version\n{version}"
    return CsvResponse(content=response)