Switch branches/tags
Nothing to show
Find file History
Latest commit 2517e4d Oct 9, 2018

README.md

Primer on Python Decorators

Code examples from the Primer on Python Decorators tutorial on Real Python.

Decorators

As noted in the article, most decorators are stored in the file decorators.py. The exceptions are those decorators that depend on third party packages (Flask and Pint), which are available in decorators_flask.py and decorators_unit.py, respectively.

Examples

Most of the code examples from the article are available in the examples.py file.

Cheat Sheet

We’ve put together a short & sweet Python decorators cheat sheet for you that summarizes the techniques explained in this tutorial:

Get the decorators cheat sheet »