Bases: CustomField
A class that represents a custom field without casting.
You can use it to annotate fields, that should not be casted.
Usage:
data: Annotated[..., NoCast()]
Source code in faststream/params/no_cast.py
| def __init__(self) -> None:
super().__init__(cast=False)
|
param_name
instance-attribute
required
instance-attribute
use
Source code in faststream/params/no_cast.py
| def use(self, **kwargs: Any) -> dict[str, Any]:
return kwargs
|
set_param_name
Source code in fast_depends/library/model.py
| def set_param_name(self: Cls, name: str) -> Cls:
self.param_name = name
return self
|
use_field
Source code in fast_depends/library/model.py
| def use_field(self, kwargs: dict[str, Any]) -> None:
raise NotImplementedError
|