tubeshowcase●1,194,391 videos♡ My collection 0
← Learn to Code

Learn to Code14:39

Building A Custom Context Manager In Python: A Closer Look

ArjanCodes ↗

From the creator

💡 Learn how to design great software in 7 steps: https://arjan.codes/designguide. Context managers in Python allow you to robustly control setup and teardown of resources. In this video, I'll show you how to use them and I'll cover several ways to create your own. The code I worked on in this video is available here: https://github.com/ArjanCodes/2022-context-managers. 🎓 ArjanCodes Courses: https://www.arjancodes.com/courses/ 🔖 Chapters: 0:00 Intro 0:53 Explaining the example 2:15 What are context managers? 3:42 Creating a context manager using a class 6:40 Creating a context manager using a decorator 9:37 Asynchronous context managers 10:07 Aiosqlite 13:50 Final thoughts #arjancodes #softwaredesign #python

Published 2022-02-04 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code