by Erik Janssens for
The SQLAlchemy ORM presents a method of associating Python classes with database tables while avoiding boilerplate Python and SQL code. But did you knew you can take it one step further and command the SQLAlchemy metaclasses to implement the data model patterns for your application.
First we will refresh our knowlede about Python metaclasses and then we will discuss the inner workings of the Declarative module and show how to use it to handle data model patterns.
Some knowledge about databases and ORM in general is needed to enjoy this talk.