Skip to content

cham11ng/decorators-and-mixin-classes

Repository files navigation

Decorators and Mixin Classes in Python

This presentation is about the compositional pattern in Python using Decorators and Mixin Classes. It will focus on how we could utilize compositional pattern in python using ideas of higher order functions and mixin classes. It also goes beyond decorators and into the world of Mixin classes for the advanced compositional pattern by manipulating "method resolution order" in order to achieve the abstractions. See presentation here.

Requirement

  • Python (v3.6+)
  • virtualenv

Installation

sudo apt install python3-venv

git clone git@github.com:cham11ng/decorators-and-mixin-classes.git

python3.6 -m venv venv

. venv/bin/activate

pip install -r requirements.txt

Getting Started

FLASK_ENV=development FLASK_APP=main.py flask run

Implementation

Contributor

cham11ng | 2019

Special Thanks to RobusGauli