Python Decorators 101

Christopher Bailey

In this course on Python decorators, you’ll learn what they are and how to create and use them. Decorators provide a simple syntax for calling higher-order functions in Python. By definition, a decorator is a function that takes another function and extends the behavior of the latter function without explicitly modifying it.

What’s Included:

Downloadable Resources:

About Christopher Bailey

Chris is an avid Pythonista and creates video tutorials for Real Python. He is a programmer and data analyst. He creates music under the name Tripnet. Chris lives in Colorado with his wife and two dogs.

» More about Christopher

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

Participant Comments

Avatar image for Ash D

Ash D on Jan. 9, 2024

Incredible course - very well thought out and designed. The best RealPython course I’ve done so far (and I’ve done quite a lot!)

The best thing about this course is how much groundwork the teacher laid first, to avoid blowing our brains up when explaining decorators, a topic which most people find quite hard to grasp.

The design of this course shows a huge amount of thought about which aspects of decorators are the sticking point for most newbies, and how convey understanding about the precursor elements that make decorators easier to understand.

I was pleasantly surprised at how relevant and useful the examples were. I liked that the text-entry screen caps are sped up so that we’re not sitting there watching someone type slowly.

Fantastic work, RP team!

This lesson was great for me. It connects multiple loose ends and gives the experience of closure. I will be playing around with this some more in the coming weeks. I always want slow speekers: Christopher speaks way too fast for me, but it is just about perfect at speed 0.75.

Thanks a lot for this one. Do not throw it away ever. It might me an older video, but I think it has great value.

Avatar image for 7ssanM

7ssanM on Oct. 16, 2021

Wonderful summary, easy to grasp, thank you very much Christopher and Real Python team.

Avatar image for Maram-dev

Maram-dev on April 27, 2021

Amazing! Now I can understand functions!!! Thank you Chris! :)

Avatar image for acharya2chn

acharya2chn on June 19, 2020

Thank you for this masterpiece! There is so much to understand and learn.

Avatar image for eshivaprasad

eshivaprasad on May 5, 2020

It is very clear Christopher Bailey. I really enjoyed it. Continue your great work

Avatar image for Howard M Sherman

Howard M Sherman on April 22, 2020

Really liked this class. It was a slow and methodical exposition on a difficult topic. I’ll probably review the class a few more times for it all to sink in. Thanks Chris!!!

Avatar image for marktripney

marktripney on April 6, 2020

I was working through a tutorial on OOP, and decorators were mentioned. Not being very confident that I knew what they were, I found myself here, and I’ve learned a huge amount already. Excellent course, Christopher - thank you.

Avatar image for rtbjobsml

rtbjobsml on Feb. 27, 2020

A great intro to decorators

Avatar image for Patrick Prince

Patrick Prince on Feb. 15, 2020

Lots of material was covered here. Very useful. Thanks!

Avatar image for Fahim

Fahim on June 24, 2019

Good real world example. Thanks

Avatar image for Vanam

Vanam on May 9, 2019

Excellent Tutorial and good examples

Avatar image for Alan Eng

Alan Eng on May 7, 2019

Mind = blown. The real-world examples really solidify my knowledge! Thanks.

Avatar image for Javier Estraviz

Javier Estraviz on April 22, 2019

Great tutorial!! Thanks!

Avatar image for Vignesh Anand Krishnan

Vignesh Anand Krishnan on April 8, 2019

These video materials are so better than the written articles. keep up the good work guys.

Avatar image for SamR

SamR on April 4, 2019

Very helpful tutorial. Thanks!

Avatar image for DMonty

DMonty on March 30, 2019

The video version of this tutorial was much better for me than the written one, which to me just seemed like an exercise to go through. I found the real world examples almost riveting and have them safely saved away!

Avatar image for Sagar

Sagar on March 28, 2019

Thanks for the awesome tutorial on Decorators. If I had to study decorators for an interview this would be my one stop shop for decorators starting right from the Beginner

Avatar image for Rynaldo I Bama

Rynaldo I Bama on March 24, 2019

It explains the concepts clearly and concisely.

Avatar image for Bradon

Bradon on March 19, 2019

Great overview of decorators!

← Browse All Courses