Primarily FastAPI and Pydantic to v2. Also ruff to latest. Updated some code to support Pydantic v2
This can be used for saving runtime-configurable settings in the database.