Skip to content

NoCast

faststream.utils.NoCast #

NoCast()

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.

Note

The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)

Source code in faststream/utils/no_cast.py
def __init__(self) -> None:
    super().__init__(cast=False)

cast instance-attribute #

cast: bool = cast

param_name instance-attribute #

param_name: Optional[str] = None

required instance-attribute #

required: bool = required

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

Keyword arguments

TYPE: Any DEFAULT: {}

RETURNS DESCRIPTION
AnyDict

Dictionary containing the keyword arguments

Note

The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)

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
    !!! note

        The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
    """
    return kwargs

Last update: 2023-11-13