PyCon Pittsburgh. April 15-23, 2020.

Talk: Hooking into the Python import system

Presented by:

Fred Phillips

Description

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.