I feel so similar. I love python, I’ve spent most of my career writing it. It’s done well for me. But damn is it just not fun anymore. Runtime errors are not fun anymore. Runtimes are not fun. Virtualenvs are not fun anymore even though uv is trying. Typeless loosy goosy code that passes dictionaries all over the place is just not fun. Rust ruined it for me. Or maybe I’m just bored.
>Typeless loosy goosy code that passes dictionaries all over the place is just not fun.
mypy --strict in CI & don't let dict[str, Any] pass review if the keys are constants, insist on a dataclass or at least a TypedDict.
> & don't let dict[str, Any] pass review
good luck with justifying that before your manager (reacting to complaints within your team, claiming you being a bottleneck).
So just make it a dict[str, str] and json encode the payload.