summaryrefslogtreecommitdiff
path: root/artima/python/example.py
blob: 3281dc98b69a491be0ebf6da7b078b24f844b68c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
'A trivial application exemplifying the call_with_conf configuration mechanism.'

dev_conf = {
    'host' : 'localhost',
    'port': '8080',
    'dsn' : 'postgres://user:pwd@localhost/development_db',
    }
 
def main(conf): # just print out the configuration
    for k, v in conf.iteritems():
        print k, v

if __name__ == '__main__': # by default use the development configuration
    main(dev_conf)