IncludeExclude
This class manages the filtering logic for including or excluding specific fields or data during processing. It provides a structured way to store and apply inclusion and exclusion criteria, typically used for controlling the visibility or serialization of object attributes.
Attributes
| Attribute | Type | Description |
|---|---|---|
| include | Optional[Any] = None | A collection of fields or patterns to be included during the serialization or processing of the object. |
| exclude | Optional[Any] = None | A collection of fields or patterns to be omitted during the serialization or processing of the object. |
Constructor
Signature
def IncludeExclude(
include: Option< Bound< 'py, PyAny > > = null,
exclude: Option< Bound< 'py, PyAny > > = null
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| include | Option< Bound< 'py, PyAny > > = null | An optional filter specifying items to include. |
| exclude | Option< Bound< 'py, PyAny > > = null | An optional filter specifying items to exclude. |
Signature
def IncludeExclude(
include: Option< Bound< 'py, PyAny > >,
exclude: Option< Bound< 'py, PyAny > >
) - > [IncludeExclude](includeexclude.md?sid=serializers_extra_includeexclude)
Parameters
| Name | Type | Description |
|---|---|---|
| include | Option< Bound< 'py, PyAny > > | A collection of keys or patterns specifying which items should be explicitly included in the output. |
| exclude | Option< Bound< 'py, PyAny > > | A collection of keys or patterns specifying which items should be explicitly omitted from the output. |