4.71 out of 5
4.71
29 reviews on Udemy

Intermediate Python: Master Decorators From Scratch

A Comprehensive Introduction to Decorators In Python with Several Practical Applications
Instructor:
Andy Bek
9,039 students enrolled
English [Auto]
Understand what decorators are and how they are used in python functional programming
Write advanced, flexible decorators to handle caching, performance timing, logging, and more
Master the syntax and, more importantly, the core ideas behind decorators
Get ample practice through 12 coding assignments, followed by detailed solutions

Welcome to the best and most complete guide to Python decorators!

In this course, you’ll cultivate a deep and practical understanding of decorators in Python, starting from the very basics. This beginner-friendly course is meticulously crafted to ensure you build a solid foundation from scratch while also getting ample practice in the process.

Before diving into decorators, we’ll explore the fundamental principles that serve as the building blocks of this intriguing topic. You’ll gain a deep understanding of higher-order functions, closures, and first-class functions – prerequisites that unlock the magic of decorators. Foundational topics include:

  • Closures

  • First-Class Functions

  • Variadics

  • Higher Order Functions

Once we have established a solid grasp of these functional foundations, we’ll dive into the captivating world of decorators. We’ll start with a gentle introduction and gradually move towards more intricate techniques. Our exploration of decorators will include:

  • Basic Decorators

  • Decorating Parameterized Functions

  • Chaining Decorators

  • Decorating Functions With Variable Arity

  • Preserving Metadata of Decorated Functions

But that’s not all! Each concept will be reinforced through engaging coding assignments of increasing difficulty. Throughout the course, will also explore several skill challenges inspired by real-world scenarios including:

  • Logging Function Output

  • Timing Runtime Performance

  • Using Decorators In Mocked Authentication Flows

  • Creating Cache Mechanisms

This course is tailored specifically for Python programmers interested in deepening their understanding of decorators as a gateway to functional programming or as a standalone, intermediate-level programming pattern.

See you inside!

Course

1
VERY Short Intro!
2
Course Resources
3
Introduction to Python Functions
4
Skill Challenge: Averaging Grades
5
Solution
6
More On Functions: *args and **kwargs
7
Skill Challenge: Variadics
8
Solution
9
Higher-Order Functions
10
Skill Challenge: Arithmetic HOF
11
Solution
12
First-Class Functions
13
Closures
14
Skill Challenge: Counter Factory
15
Solution
16
Basic Introduction To Decorators
17
Decorating Parameterized Functions
18
Skill Challenge - Let's Log
19
Solution
20
Skill Challenge - Lotto Draws
21
Solution
22
Skill Challenge - Writing A Timer
23
Solution
24
Decorators With Arguments
25
Skill Challenge - Repeated Lotto Draws
26
Solution
27
Chaining Multiple Decorators
28
Preserving Identity With @wraps
29
Skill Challenge - Delaying Downloads
30
Solution
31
Skill Challenge - Authentication Workflow Part I
32
Solution Part I
33
Skill Challenge - Authentication Workflow Part II
34
Solution Part II
35
Skill Challenge - Building A Cache
36
Solution
You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
4.7
4.7 out of 5
29 Ratings

Detailed Rating

Stars 5
19
Stars 4
9
Stars 3
1
Stars 2
0
Stars 1
0
dd5841628cce4b7c6910b3d125085297
Get course
30-Day Money-Back Guarantee

Includes

3 hours on-demand video
1 article
Full lifetime access
Access on mobile and TV
Certificate of Completion