An API key named key in a header (case-insensitive), query
parameter or cookie; the credential is a Redacted string.
Attributes#
| Attribute | Type | Description |
|---|---|---|
key | str | |
in_ | Literal['header', 'query', 'cookie'] = 'header' |
Functions#
__init__#
__init__(key, in_='header', *, annotations=Context.empty()) -> None| Parameter | Type | Description |
|---|---|---|
key | str | |
in_ | Literal['header', 'query', 'cookie'] = 'header' | |
annotations | Context[Any] = Context.empty() |
annotate#
annotate[S, T](tag, value) -> SelfThis security with an annotation (OpenApi.Description, ...).
| Parameter | Type | Description |
|---|---|---|
tag | TagLike[S, T] | |
value | S |
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| Parameter | Type | Description |
|---|---|---|
annotations | Context[Any] |
Returns Self
def annotate_merge(self, annotations: Context[Any]) -> Self:
return replace(self, annotations=self.annotations.merge(annotations))pipe#
pipe[B](f) -> B| Parameter | Type | Description |
|---|---|---|
f | Callable[[Self], B] |
Returns B
def pipe[B](self, f: Callable[[Self], B], /) -> B:
return f(self)