get_version
Retrieves and prints the version information for Python, Flask, and Werkzeug to the console before exiting the application.
def get_version(
ctx: click.Context,
param: click.Parameter,
value: t.Any
) - > None
Prints the current versions of Python, Flask, and Werkzeug to the console and exits the program. This function is typically used as a callback for a Click command-line option to provide environment diagnostic information.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | click.Context | The Click context object used to check for resilient parsing and to control output coloring. |
| param | click.Parameter | The Click parameter object associated with the version flag. |
| value | t.Any | The value of the parameter; if falsy, the function returns early without printing. |
Returns
| Type | Description |
|---|---|
None | Nothing; the function terminates the process via ctx.exit() after printing version information. |