Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cham11ng/decorators-and-mixin-classes

Presentation examples for Decorators and Mixin Classes in Python
https://github.com/cham11ng/decorators-and-mixin-classes

classes decorators flask logging mixin python

Last synced: 8 days ago
JSON representation

Presentation examples for Decorators and Mixin Classes in Python

Awesome Lists containing this project

README

        

# 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](https://sagarchamling.com/slides/decorators-and-mixin-classes-in-python/).

## Requirement

- Python (v3.6+)
- virtualenv

## Installation

```bash
sudo apt install python3-venv

git clone [email protected]:cham11ng/decorators-and-mixin-classes.git

python3.6 -m venv venv

. venv/bin/activate

pip install -r requirements.txt
```

## Getting Started

```bash
FLASK_ENV=development FLASK_APP=main.py flask run
```

## Implementation

- https://github.com/RobusGauli/jsonvalidate

## Contributor

[cham11ng](https://github.com/cham11ng) | 2019

Special Thanks to [RobusGauli](https://github.com/RobusGauli)