CertParamType
Click option type for the --cert option. Allows either an existing file, the string 'adhoc', or an import for a :class:~ssl.SSLContext object.
Attributes
| Attribute | Type | Description |
|---|---|---|
| name | string = "path" | The internal label used by Click to identify this parameter type in help text and error messages. |
Constructor
Signature
def CertParamType() - > None
Signature
def CertParamType() - > null
Methods
convert()
@classmethod
def convert(
value: t.Any,
param: click.Parameter | None,
ctx: click.Context | None
) - > t.Any
Converts the input value into a valid certificate representation, supporting file paths, the 'adhoc' keyword, or an importable SSLContext object.
Parameters
| Name | Type | Description |
|---|---|---|
| value | t.Any | The raw input value from the command line to be validated and converted. |
| param | `click.Parameter | None` |
| ctx | `click.Context | None` |
Returns
| Type | Description |
|---|---|
t.Any | A validated file path string, the literal string 'adhoc', or an instance of ssl.SSLContext. |