Package pyechonest :: Module config
[hide private]
[frames] | no frames]

Source Code for Module pyechonest.config

 1  #!/usr/bin/env python 
 2  # encoding: utf-8 
 3   
 4  """ 
 5  Copyright (c) 2010 The Echo Nest. All rights reserved. 
 6  Created by Tyler Williams on 2010-04-25. 
 7   
 8  Global configuration variables for accessing the Echo Nest web API. 
 9  """ 
10   
11  import pkg_resources 
12   
13  try: 
14      __version__ = pkg_resources.require("pyechonest")[0].version 
15  except pkg_resources.DistributionNotFound: 
16      __version__ = "0.0.0" 
17   
18  import sys, os 
19   
20  envkeys = ["ECHO_NEST_API_KEY", "ECHO_NEST_CONSUMER_KEY", "ECHO_NEST_SHARED_SECRET"] 
21  this_module = sys.modules[__name__] 
22  for key in envkeys: 
23      setattr(this_module, key, os.environ.get(key, None)) 
24   
25  API_HOST = 'developer.echonest.com' 
26  "The API endpoint you're talking to" 
27   
28  API_SELECTOR = 'api' 
29  "API selector... just 'api' for now" 
30   
31  API_VERSION = 'v4' 
32  "Version of api to use... only 4 for now" 
33   
34  HTTP_USER_AGENT = 'PyEchonest' 
35  """ 
36  You may change this to be a user agent string of your 
37  own choosing 
38  """ 
39   
40  TRACE_API_CALLS = False 
41  """ 
42  If true, API calls will be traced to the console 
43  """ 
44   
45  CALL_TIMEOUT = 10 
46  """ 
47  The API call timeout (seconds) 
48  """ 
49   
50  CODEGEN_BINARY_OVERRIDE = None 
51  """ 
52  Location of your codegen binary. If not given, we will guess codegen.platform-architecture on your system path, e.g. codegen.Darwin, codegen.Linux-i386 
53  """ 
54