Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/cham11ng/decorators-and-mixin-classes
- Owner: cham11ng
- Created: 2019-02-08T14:49:32.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-05-07T18:40:19.000Z (6 months ago)
- Last Synced: 2024-05-07T19:41:11.223Z (6 months ago)
- Topics: classes, decorators, flask, logging, mixin, python
- Language: Python
- Homepage: https://sagarchamling.com/slides/decorators-and-mixin-classes-in-python/
- Size: 20.5 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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-venvgit 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)