PyBites Platform logo

Hone Your Python Skills!

  • Newbie Bites
  • Intro Bites
  • Regular Bites
  • Learning Paths
  • 100 Days of Code
  • Pricing
  • Community
  • Login
  • Pybites blog articles
  • Subscribe to our YouTube Channel
  • Follow us on Twitter
Get our Python Tips Book
☰ ☰

PyBites Platform

Pybites Platform 2.0 is live 🎉 🐍 Join us now 📈

PyBites Learning Paths

Login and code
« Show all Paths

Decorators and Context Managers


Your Python toolkit won't be the same again after learning about two important patterns: decorators and context managers. Ready to become a Ninja? For decorators you can check out our Learning Python Decorators by Example article but most important is to get coding!

PyBites Decorators and Context Managers Learning Path Badge

Bites of Py


Beginner level icon
☐ 1.1 - Create a sandwich decorator
Intermediate level icon
☐ 2.1 - Write a decorator with argument
☐ 2.2 - Write a login_required decorator
☐ 2.3 - Write a numbers validation decorator
☐ 2.4 - Suppressing exceptions
☐ 2.5 - Capture stdout
Advanced level icon
☐ 3.1 - Write a context manager
☐ 3.2 - The singledispatch countdown challenge
☐ 3.3 - Write a performance monitoring context manager
☐ 3.4 - Manipulate string decorator
☐ 3.5 - Cached property decorator
☐ 3.6 - Write a retry decorator

© CodeChalleng.es is <> with ♥ by PyBites | Testimonials

This week, each one of you has a homework assignment ... - Tyler Durden (Fight club)