prefect.server.utilities.schemas.bases
get_class_fields_only
PrefectDescriptorBase
PrefectBaseModel
model_dump_for_orm
BaseModel.model_dump
. Generate a Python dictionary
representation of the model suitable for passing to SQLAlchemy model
constructors, INSERT
statements, etc. The critical difference here is that
this method will return any nested BaseModel objects as BaseModel
instances,
rather than serialized Python dictionaries.
Accepts the standard Pydantic model_dump
arguments, except for mode
(which
is always “python”), round_trip
, and warnings
.
Usage docs: https://docs.pydantic.dev/2.6/concepts/serialization/#modelmodel_dump
Args:
include
: A list of fields to include in the output.exclude
: A list of fields to exclude from the output.by_alias
: Whether to use the field’s alias in the dictionary key if defined.exclude_unset
: Whether to exclude fields that have not been explicitly set.exclude_defaults
: Whether to exclude fields that are set to their default
value.exclude_none
: Whether to exclude fields that have a value of None
.reset_fields
_reset_fields
set.
Returns:
IDBaseModel
model_validate_list
reset_fields
_reset_fields
set.
Returns:
TimeSeriesBaseModel
ORMBaseModel
ActionBaseModel
model_validate_list
reset_fields
_reset_fields
set.
Returns: