Skip to content

refactor(backend): switch to pydantic from marshmallow#1076

Draft
mikonse wants to merge 1 commit into
TomBursch:mainfrom
mikonse:milo/pydantic-refactoring
Draft

refactor(backend): switch to pydantic from marshmallow#1076
mikonse wants to merge 1 commit into
TomBursch:mainfrom
mikonse:milo/pydantic-refactoring

Conversation

@mikonse

@mikonse mikonse commented May 23, 2026

Copy link
Copy Markdown
Contributor

As a proposal for a longer refactoring with the end goal of moving from flask + marshmallow to fastapi + pydantic this would be the first step to refactor the API datamodels from marshmallow to pydantic.

The idea behind this switch in framework / underlying library for me is that pydantic + fastapi produces a much nicer editor experience because you can rely on type checker and editor autocompletion support for the schemas and have a lower chance of getting errors into the API controller code due to typos / type mismatches.

Additionally the currently somewhat manually documented API in the kitchenowl docs could be replaced by the automatic openapi export that fastapi supports with an inline swagger API browser.

@TomBursch I'm very much open to discussion about this. If this is something you would be interested to see I'm happy to drive this forward and open pulls along the way. I'll try to keep this as multi stage refactors so we would have multiple sets of changes instead of one big change to fastapi.

@mikonse mikonse force-pushed the milo/pydantic-refactoring branch from 0a7de00 to 7795dae Compare May 26, 2026 20:17
@mikonse mikonse force-pushed the milo/pydantic-refactoring branch from 7795dae to 72d0c0b Compare May 26, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant