The goal of this project is to develop skills around serializing Python classes to and from both SQL and JSON.

Codebase here:


User Story:
AS A financial analyst

I WANT TO map my companies across various things like KPIS and SECTORS

SO THAT I can visualize mappings easily in an app with JSON (and share with Javascript front end apps) but also maintain a second form database structure on the back end in SQL

This project uses flask and marshmallow along with sqlalchemy as an ORM.


The uses a combination of sqlalchemy’s Model class inheritance and Marshmallow auto schema for serialization.


Run to initialize the SQLite database.

Credit Anthony @ Pretty Printed – I updated his code for the new version of Marshmallow: