Import hooks and the import system in general is an under-used and under-documented resource within Python. This talk will introduce the audience to the import system, how it works, and how it can be adapted for their needs. We will build a simple import hook that can inspect what is being imported, and go on to demonstrate how we can use the import system to load Python modules from a database and how to reload files on disk immediately as they are changed.
Watch video Talks - Fred Phillips: Hooking into the import system online without registration, duration hours minute second in high quality. This video was added by user PyCon US 23 May 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,104 once and liked it 49 people.