Inflection (camel-cased keys)¶
HTTP APIs will often use camel-cased keys for their input and output representations. This example shows how you can use the
Schema.on_bind_field hook to automatically inflect keys.
To run the example:
$ uv run examples/inflection_example.py
Loaded data:
{'first_name': 'David', 'last_name': 'Bowie'}
Dumped data:
{'firstName': 'David', 'lastName': 'Bowie'}