get_version
Prints the Python, Flask, and Werkzeug versions to the console and then exits the application.
def get_version(
ctx: click.Context,
param: click.Parameter,
value: t.Any
) - > None
Prints the Python, Flask, and Werkzeug versions to the console and then exits the program. This function is typically used as a callback for a command-line option to display version information.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | click.Context | The Click context object, providing access to command-line parameters and utilities. It is used to check for resilient parsing and to exit the program. |
| param | click.Parameter | The Click parameter object associated with the version option. This parameter is not directly used in the function's logic. |
| value | t.Any | The value of the command-line option. If this value is falsy or if resilient parsing is enabled, the function returns without printing versions or exiting. |
Returns
| Type | Description |
|---|---|
None | This function does not return a value; it exits the program after printing the version information. |