PyCon Israel 2025

Decorators in Python: Powerful Patterns & Practical Uses
09-09, 13:30–13:50 (Asia/Jerusalem), Hall 1
Language: English

Decorators are one of the most powerful and expressive features in Python, yet they can be confusing for many developers. In this talk, we’ll demystify decorators by exploring how they work, how to write them, and how to use them effectively.


This talk is designed for intermediate Python developers who want to take their skills to the next level by mastering one of Python’s most versatile features: decorators.

We’ll begin by revisiting the concept of functions as first-class objects, which sets the foundation for understanding how decorators operate. From there, we’ll walk through writing simple decorators, then progress to more advanced topics such as:
+ Decorators with arguments
+ Stacking multiple decorators
+ Class-based decorators
+ Decorators applied to methods and classes

Real-world examples will highlight how decorators are used in real-world applications, such as web development, logging, access control, and benchmarking.

Attendees will leave this talk with a clear mental model of decorators, the ability to confidently implement them, and inspiration to apply them in their own projects. This talk will also provide best practices and tips for keeping decorator logic clean, testable, and maintainable.

This talk can be delivered in Hebrew (my mother tongue) and English.


Expected experience level of participants

Intermediate

Target audience

Developers

Haim Michael started coding when he was 8 years old. During the years 2001 – 2007, Haim led the development of more than 200 applications and games for mobile telephones, together with their complementary server-side applications. Haim focuses on programming languages, and his rich knowledge and experience in Java programming span more than 25 years. Haim is a PHP Zend Certified Engineer, OMG-Certified UML Professional, Certified Java Professional, and a Certified Java EE Web Components Developer. In addition, Haim Michael holds an MBA (cum-laude) from Tel Aviv University.