Python

How to dynamically create a class with some mixins

Let’s say you want to create a class that includes mixins having names that are known at execution time only, you would do some thing like this :

To get mixins_classes, juste use importlib to get mixins classes from names.

A function that would create an instance of such a dynamic class would be something like this :