<s> """<STR_LIT>""" <EOL> import os <EOL> class Default ( object ) : <EOL> """<STR_LIT>""" <EOL> BASE_PATH = '<STR_LIT>' <EOL> MAPREDUCE_PATH = '<STR_LIT>' <EOL> DEFERRED_PATH = BASE_PATH + '<STR_LIT>' <EOL> CLEANUP_MAPREDUCE_STATE = True <EOL> DEFAULT_APP_DOMAIN = '<STR_LIT>' <EOL> GOOGLE_API_HOSTNAME = '<STR_LIT>' <EOL> GOOGLE_API_OAUTH_SCOPE_HOSTNAME = '<STR_LIT>' <EOL> GS_API_HOSTNAME = '<STR_LIT>' <EOL> DATASTORE_ADMIN_API_NAME = None <EOL> DATASTORE_ADMIN_API_VERSION = None <EOL> DATASTORE_ADMIN_API_VALIDATE_SSL = True <EOL> DATASTORE_ADMIN_API_TIMEOUT_SECS = <NUM_LIT:30> <EOL> ADMIN_CONSOLE_URL = '<STR_LIT>' <EOL> @ property <EOL> def GOOGLE_API_HOST ( self ) : <EOL> return '<STR_LIT>' % self . GOOGLE_API_HOSTNAME <EOL> def GoogleApiScope ( self , scope_type ) : <EOL> return '<STR_LIT>' % ( self . GOOGLE_API_AUTH , scope_type ) <EOL> @ property <EOL> def GOOGLE_API_AUTH ( self ) : <EOL> return '<STR_LIT>' % self . GOOGLE_API_OAUTH_SCOPE_HOSTNAME <EOL> @ property <EOL> def DISCOVERY_URL ( self ) : <EOL> return '<STR_LIT>' % ( <EOL> self . GOOGLE_API_HOSTNAME ) <EOL> def GsBucketURL ( self , bucket_name ) : <EOL> return '<STR_LIT>' % ( self . GS_API_HOSTNAME , bucket_name ) <EOL> class Local ( Default ) : <EOL> """<STR_LIT>""" <EOL> class Prod ( Default ) : <EOL> """<STR_LIT>""" <EOL> DEFAULT_APP_DOMAIN = '<STR_LIT>' <EOL> try : <EOL> import config_runtime <EOL> RUNTIME_DATACENTER_TO_CLASS = config_runtime . RUNTIME_DATACENTER_TO_CLASS <EOL> PRODUCTION_CLASS = config_runtime . ProdRuntime <EOL> except ImportError : <EOL> RUNTIME_DATACENTER_TO_CLASS = { } <EOL> PRODUCTION_CLASS = Prod <EOL> def GetConfig ( ) : <EOL> """<STR_LIT>""" <EOL> datacenter = os . environ . get ( '<STR_LIT>' ) <EOL> if not datacenter : <EOL> return Local <EOL> for prefix , config in RUNTIME_DATACENTER_TO_CLASS . items ( ) : <EOL> if datacenter . startswith ( prefix ) : <EOL> return config <EOL> return PRODUCTION_CLASS <EOL> def Export ( cls ) : <EOL> """<STR_LIT>""" <EOL> global current <EOL> current = cls ( ) <EOL> for name in dir ( current ) : <EOL> if not name . startswith ( '<STR_LIT:_>' ) : <EOL> globals ( ) [ name ] = getattr ( current , name ) <EOL> current = None <EOL> Export ( GetConfig ( ) ) </s>
