Master Decorators Scratch

Source: Intermediate Python: Master Decorators From Scratch | Udemy

A Comprehensive introduction to Decorators in Python with several practical applications

Created by Andy Bek

What you’ll learn

  • 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

Course content

1 section • 36 lectures • 2h 52m total length
  • Course Resources

    00:07

  • Skill Challenge: Averaging Grades

    00:53

  • Solution

    02:56

  • Skill Challenge: Variadics

    01:20

  • Solution

    02:40

  • Higher-Order Functions

    07:59

  • Skill Challenge: Arithmetic HOF

    01:26

  • Solution

    02:25

  • First-Class Functions

    06:12

  • Closures

    07:51

  • Skill Challenge: Counter Factory

    02:10

  • Solution

    06:28

  • Basic Introduction To Decorators

    08:21

  • Decorating Parameterized Functions

    05:47

  • Skill Challenge – Let’s Log

    01:46

  • Solution

    03:07

  • Skill Challenge – Lotto Draws

    01:04

  • Solution

    03:07

  • Skill Challenge – Writing A Timer

    00:43

  • Solution

    05:26

  • Decorators With Arguments

    08:04

  • Skill Challenge – Repeated Lotto Draws

    01:05

  • Solution

    02:22

  • Chaining Multiple Decorators

    05:32

  • Preserving Identity With @wraps

    09:07

  • Skill Challenge – Delaying Downloads

    03:00

  • Solution

    06:40

  • Skill Challenge – Authentication Workflow Part I

    02:09

  • Solution Part I

    12:45

  • Skill Challenge – Authentication Workflow Part II

    02:06

  • Solution Part II

    11:02

  • Skill Challenge – Building A Cache

    03:00

  • Solution

    11:30

Requirements

  • Some familiarity with python is preferred, though not strictly required

Description

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!

Who this course is for:

  • Beginner Python developers interested in stepping up into intermediate and advance topics

Leave a Reply

The maximum upload file size: 500 MB. You can upload: image, audio, video, document, spreadsheet, interactive, other. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here