I have a file that contains all the variables my application needs:
config.py
AWS_KEY=1234
AWS_SECRET=5678
modules/db.py
from project.libraries import boto as boto
conn = boto.connect_dynamodb(
aws_access_key_id=AWS_KEY
aws_secret_access_key=AWS_SECRET)
How can I get the variables from config.py into modules/db.py?
(Or, is this the wrong approach?)
Thanks.
modules/db.py
Alternatively,
Or, if you want to keep the config prefix,
Forgive me if you’ve already done so, but have you read about python modules?