Skip to main content

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

AttributeTypeDescription
namestring = "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

NameTypeDescription
valuet.AnyThe raw input value from the command line to be validated and converted.
param`click.ParameterNone`
ctx`click.ContextNone`

Returns

TypeDescription
t.AnyA validated file path string, the literal string 'adhoc', or an instance of ssl.SSLContext.