how to share global varuables between classes and files python$ code example
Example: python global variable across files
# config.py
x = 0
# mod.py
import config
config.x = 1
# main.py
import config
import mod
print(config.x) # will print '1'
# config.py
x = 0
# mod.py
import config
config.x = 1
# main.py
import config
import mod
print(config.x) # will print '1'