Context
faststream.utils.context.types.Context #
Bases: CustomField
A class to represent a context.
ATTRIBUTE | DESCRIPTION |
---|---|
param_name | name of the parameter
|
METHOD | DESCRIPTION |
---|---|
__init__ | constructor method |
use | method to use the context |
Initialize the object.
PARAMETER | DESCRIPTION |
---|---|
real_name | The real name of the object. TYPE: |
default | The default value of the object. TYPE: |
initial | The initial value builder. |
cast | Whether to cast the object. TYPE: |
prefix | The prefix to be added to the name of the object. TYPE: |
RAISES | DESCRIPTION |
---|---|
TypeError | If the default value is not provided. |
Source code in faststream/utils/context/types.py
set_param_name #
use_field #
use #
Use the given keyword arguments.
PARAMETER | DESCRIPTION |
---|---|
**kwargs | Keyword arguments to be used TYPE: |
RETURNS | DESCRIPTION |
---|---|
AnyDict | A dictionary containing the updated keyword arguments |