GitHub

API reference for Basic.

HTTP Basic: the credential is Credentials (empty when absent).

Functions

__init__

__init__(*, annotations=Context.empty()) -> None
ParameterTypeDescription
annotationsContext[Any] = Context.empty()

annotate

annotate[S, T](tag, value) -> Self

This security with an annotation (OpenApi.Description, ...).

ParameterTypeDescription
tagTagLike[S, T]
valueS

Returns Self

def annotate[S, T](self, tag: TagLike[S, T], value: S) -> Self:
    """This security with an annotation (``OpenApi.Description``, ...)."""
    return replace(self, annotations=self.annotations.add(tag, value))

annotate_merge

annotate_merge(annotations) -> Self
ParameterTypeDescription
annotationsContext[Any]

Returns Self

def annotate_merge(self, annotations: Context[Any]) -> Self:
    return replace(self, annotations=self.annotations.merge(annotations))

pipe

pipe[B](f) -> B
ParameterTypeDescription
fCallable[[Self], B]

Returns B

def pipe[B](self, f: Callable[[Self], B], /) -> B:
    return f(self)