Skip to content

Make worker configuration a MagicDict

Exploration: Why not make the worker config attribute a MagicDict. Right now, most workers have billions of lines like

self.attribute = self.config["attribute"]

But what if the workers could simply do

self.attribute # shortcut of self.config.attribute

This also implies overriding the __getattr__ method.