Skip to main content

get_version

Prints the version information for Python, Flask, and Werkzeug to the console and exits the program.

def get_version(
ctx: click.Context,
param: click.Parameter,
value: t.Any
) - > None

Prints the current versions of Python, Flask, and Werkzeug to the standard output and exits the application.

Parameters​

NameTypeDescription
ctxclick.ContextThe Click context object used to determine color settings and handle the exit signal.
paramclick.ParameterThe Click parameter object associated with the version flag.
valuet.AnyThe value of the parameter; if falsey, the function returns immediately without printing.

Returns​

TypeDescription
NoneNothing; the function terminates the process after printing version information.