In 2019 kzfm gave an example of using SQLAlchemy to work with the database.
In my work to replace the JSON-Lines fragment format with a SQLite-based format I quickly discovered that I am hand-writing an ORM. Poorly.
I propose switching using SQLAlchemy in this updated version I am working on.
At this point I don't know how much work that requires. kzfm showed that defining the structure and querying the generated mmpdb database was simple.