Skip to content
Discussion options

You must be logged in to vote

You can use a "form feed" character (\f) to achieve this:

@app.command()
def run(things: list[str]) -> None:
    """
    Execute some things.
    \f

    :param things: List of things to execute
    :return: None
    """

It seems that it's not documented in Typer's docs, but it works.
Read about it in FastAPI's docs: https://fastapi.tiangolo.com/advanced/path-operation-advanced-configuration/#advanced-description-from-docstring

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by YuriiMotov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or problem
2 participants