Let\'s say you have some time-consuming work to do when a module/class is first imported. This functionality is dependent on a passed in variable. It only needs to be done
There is no way to pass a variable at import.
Some ideas:
Couple of other options that can achieve your goal (although a init() function is probably cleaner):