I don't like doing things other than importing with the import method, but that's a side issue. The real issue is that, as you guessed, putting this info in all the subclasses is even worse. The goal is to keep this database connection info somewhere outside of these classes entirely, and to do it with some indirection so that the classes themselves don't have to know the name of my config class, just the interface.