CamelCaseModel#
- class safir.pydantic.CamelCaseModel(**data)#
Bases:
BaseModelpydantic.BaseModelconfigured to accept camel-case input.This is a convenience class identical to
BaseModelexcept with an alias generator configured so that it can be initialized with either camel-case or snake-case keys. Model exports withdictorjsonalso default to exporting in camel-case.- Parameters:
data (
Any) –
Methods Summary
dict(**kwargs)Export the model as a dictionary.
json(**kwargs)Export the model as JSON.
Methods Documentation
- dict(**kwargs)#
Export the model as a dictionary.
Overridden to change the default of
by_aliasfrom False to True, so that by default the exported dictionary uses camel-case.