GitHub

API reference for Field.

A field's schema per variant; a variant missing from schemas leaves the field out of that variant. A is the field's Type in the default variant (the annotation a class field must have).

Attributes

AttributeTypeDescription
schemasMapping[str, AnyCodec]

Functions

__init__

__init__(schemas) -> None
ParameterTypeDescription
schemasMapping[str, AnyCodec]

pipe

pipe[B](f) -> B

f(self): S.Int.pipe(model.field_only(["select"])) and so on.

ParameterTypeDescription
fCallable[[Field[A_co]], B]

Returns B

def pipe[B](self, f: Callable[[Field[A_co]], B], /) -> B:
    """``f(self)``: ``S.Int.pipe(model.field_only(["select"]))`` and so on."""
    return f(self)