Files
cms-website/.deps_siteforge_v812/pydantic/__pycache__/config.cpython-312.pyc
T

66 lines
7.4 KiB
Plaintext
Raw Normal View History

Ë
ðÅÙjõ­ãóä—UdZddlmZddlZddlmZddlmZm Z m
Z
m Z m Z m
Z
mZmZddlmZmZmZmZddlmZdd lmZdd
lmZdd lmZerdd lmZdd
lm Z m!Z!dZ"e
e#e$e%e&de'ddfZ(de)d<e*e%e(fZ+de)d<e
e ge fZ,e
e
e+gdfe
e+e-e gdffZ.de)d<e dZ/Gd„ded¬«Z0e de-¬«Z1eed«dd„««Z2edd„«Z2ed d„«Z2d!d"d„Z2ee3«Z4y)#z"Configuration for Pydantic models.é)Ú annotationsN)ÚPattern)Ú
TYPE_CHECKINGÚAnyÚCallableÚLiteralÚTypeVarÚUnionÚcastÚoverload)Ú TypeAliasÚ TypedDictÚUnpackÚ
deprecatedé)Úgetattr_migration)ÚAliasGenerator)ÚPydanticUserError)ÚPydanticDeprecatedSince211)ÚGenerateSchema)ÚComputedFieldInfoÚ FieldInfo)Ú
ConfigDictÚ with_configÚ JsonValueÚJsonDictr
ÚJsonSchemaExtraCallable)ÚallowÚignoreÚforbidcóP—eZdZUdZded< ded< ded< ded < ded
< ded < d ed
< ded< ded< ded< ded< ded< ded< ded< ded< ded< ded< ded< ded< ded< d ed!< ded"< d#ed$< d%ed&< d'ed(< d)ed*< d+ed,< d+ed-< d.ed/< ded0< ded1< d2ed3< ded4< ded5< d6ed7< d8ed9< ded:< d;ed<< ded=< d>ed?< ded@< dedA< dBedC< dedD< dedE< dedF< dedG< dedH<yI)Jrz/A TypedDict for configuring Pydantic behaviour.z
str | NoneÚtitlezCallable[[type], str] | NoneÚmodel_title_generatorz:Callable[[str, FieldInfo | ComputedFieldInfo], str] | NoneÚfield_title_generatorÚboolÚ str_to_lowerÚ str_to_upperÚstr_strip_whitespaceÚintÚstr_min_lengthz
int | NoneÚstr_max_lengthzExtraValues | NoneÚextraÚfrozenÚpopulate_by_nameÚuse_enum_valuesÚvalidate_assignmentÚarbitrary_types_allowedÚfrom_attributesÚ loc_by_aliasz,Callable[[str], str] | AliasGenerator | NoneÚalias_generatorztuple[type, ...]Ú
ignored_typesÚ
allow_inf_nanz)JsonDict | JsonSchemaExtraCallable | NoneÚjson_schema_extraz&dict[type[object], JsonEncoder] | NoneÚ
json_encodersÚstrictz0Literal['always', 'never', 'subclass-instances']Úrevalidate_instanceszLiteral['iso8601', 'float']Úser_json_timedeltaz-Literal['iso8601', 'seconds', 'milliseconds']Úser_json_temporalz+Literal['seconds', 'milliseconds', 'infer']Úval_temporal_unitz Literal['utf8', 'base64', 'hex']Úser_json_bytesÚval_json_bytesz'Literal['null', 'constants', 'strings']Úser_json_inf_nanÚvalidate_defaultÚvalidate_returnztuple[str | Pattern[str], ...]Úprotected_namespacesÚhide_input_in_errorsÚ defer_buildzdict[str, object] | NoneÚplugin_settingsztype[_GenerateSchema] | NoneÚschema_generatorÚ+json_schema_serialization_defaults_requiredz,Literal['validation', 'serialization', None]Újson_schema_mode_overrideÚcoerce_numbers_to_strz"Literal['rust-regex', 'python-re']Ú regex_engineÚvalidation_error_causeÚuse_attribute_docstringsz%bool | Literal['all', 'keys', 'none']Ú
cache_stringsÚvalidate_by_aliasÚvalidate_by_nameÚserialize_by_aliasÚurl_preserve_empty_pathÚpolymorphic_serializationN)Ú__name__Ú
__module__Ú __qualname__Ú__doc__Ú__annotations__©óúSC:\Users\30997\AppData\Local\Temp\pip-target-6g32zz5s\lib\python\pydantic/config.pyrr$sT…Ù9à ÓØOà7Ó7Ø_àUÓUØeàÓØ\àÓØ\àÓØIàÓØ?àÓØ?à Óðqðf
ƒLððÓð$ðLÓð$ðLÓð1ðf"Ó!ð4ðlÓððÓðMàAÓAð8ðt$Ó#ðð ÓØvà@Ó@ØYà9Ó9ðð
ƒLðð:KÓJðEðN4Ó3ð ðEÓDðð,CÓBðð$5Ó4ðð5Ó4ð
ð>Ó=ððÓØTàÓØYà8Ó8ð[ðzÓð)ðVÓð
ð.Ó-Ø?à2Ó2ðð26Ó5ð'ðR LÓKð7ðr Óð#ðJ5Ó4ð$ðL!Ó ð ð#Ó"ð&ðP9Ó8ðð*Óð"ðHÓð$ðLÓððB"Ó!ðð( $Ó#ðrZrF)ÚtotalÚ_TypeT)ÚboundzePassing `config` as a keyword argument is deprecated. Pass `config` as a positional argument instead.có—y©NrY©Úconfigs r[rrÃs€àFIrZcó—yr`rYras r[rrÈs€ØFIrZc ó—yr`rYras r[rrÌs€ØMPrZc óö‡—|�
|r td«‚t|«dk(r@|jd«x}�-tjdt
d¬«t
t|«Šn|�|nt
t|«Šdˆfd„ }|S) a!!! abstract "Usage Documentation"
[Configuration with other types](../concepts/config.md#configuration-on-other-supported-types)
A convenience decorator to set a [Pydantic configuration](config.md) on a `TypedDict` or a `dataclass` from the standard library.
Although the configuration can be set using the `__pydantic_config__` attribute, it does not play well with type checkers,
especially with `TypedDict`.
!!! example "Usage"
```python
from typing_extensions import TypedDict
from pydantic import ConfigDict, TypeAdapter, with_config
@with_config(ConfigDict(str_to_lower=True))
class TD(TypedDict):
x: str
ta = TypeAdapter(TD)
print(ta.validate_python({'x': 'ABC'}))
#> {'x': 'abc'}
```
/// deprecated-removed | v2.11 v3
Passing `config` as a keyword argument.
///
/// version-changed | v2.11
Keyword arguments can be provided directly instead of a config dictionary.
///
z2Cannot specify both `config` and keyword argumentsrrbzdPassing `config` as a keyword argument is deprecated. Pass `config` as a positional argument insteadé)ÚcategoryÚ