Python Decorators 101

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

Christopher Bailey 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

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.

7ssanM on Oct. 16, 2021

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

Maram-dev on April 27, 2021

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

acharya2chn on June 19, 2020

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

eshivaprasad on May 5, 2020

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

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!!!

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.

rtbjobsml on Feb. 27, 2020

A great intro to decorators

Patrick Prince on Feb. 15, 2020

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

Fahim on June 24, 2019

Good real world example. Thanks

Vanam on May 9, 2019

Excellent Tutorial and good examples

Alan Eng on May 7, 2019

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

Javier Estraviz on April 22, 2019

Great tutorial!! Thanks!

Vignesh Anand Krishnan on April 8, 2019

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

SamR on April 4, 2019

Very helpful tutorial. Thanks!

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!

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

Rynaldo I Bama on March 24, 2019

It explains the concepts clearly and concisely.

Bradon on March 19, 2019

Great overview of decorators!

« Browse All Courses