Bases: CustomField
A class that represents a custom field without casting.
METHOD | DESCRIPTION |
__init__ | Initializes the NoCast object. |
use | Returns the provided keyword arguments as a dictionary. |
Initialize the NoCast object.
Source code in faststream/utils/no_cast.py
| def __init__(self) -> None:
"""Initialize the NoCast object."""
super().__init__(cast=False)
|
param_name instance-attribute
required instance-attribute
set_param_name
set_param_name(name: str) -> Cls
Source code in fast_depends/library/model.py
| def set_param_name(self: Cls, name: str) -> Cls:
self.param_name = name
return self
|
use
use(**kwargs: Any) -> AnyDict
Return a dictionary containing the keyword arguments passed to the function.
PARAMETER | DESCRIPTION |
**kwargs | TYPE: Any DEFAULT: {} |
RETURNS | DESCRIPTION |
AnyDict | Dictionary containing the keyword arguments |
Source code in faststream/utils/no_cast.py
| def use(self, **kwargs: Any) -> AnyDict:
"""Return a dictionary containing the keyword arguments passed to the function.
Args:
**kwargs: Keyword arguments
Returns:
Dictionary containing the keyword arguments
"""
return kwargs
|
use_field
Source code in fast_depends/library/model.py
| def use_field(self, kwargs: Dict[str, Any]) -> None:
raise NotImplementedError("You should implement `use_field` method.")
|