Contribute Media
A thank you to everyone who makes this possible: Read More

Everything is a (Python) module

Description

Imagine importing a JSON file into Python as a module. Yes, I'm talking about having a config.json file and importing it with import config. Or even more, how about accessing JPG metadata with import gps_coordinates from album.IMG00001? The highly dynamic nature of Python, in addition to the right combination of magic methods and a pinch of monkey-patching, allow us to customise the import machinery up to the point of enabling these and other interesting use cases.

Details

Improve this page