@badnetmask is this the thing you feel should exist in current year? I can't endorse it specifically but I think the magic words are sqlalchemy and pydantic and that's what this is.
SQLModel
SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness.
(sqlmodel.tiangolo.com)