Step by step guide to python decorators and how to use them

So you are reading this post which means you already have some knowledge about python and some vague ideas about decorators. Let’s walk through this article, we hope your idea about decorator will be much more solid by the end of this article. bonus we will try to create the decorator “app.route(‘/’)” you used to see in Flask from scratch.

So what is a decorator and why do we need this?

Decorators as the name suggests are a way to decorate any python object and replaces the old…


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store