"""
Global configuration variables for accessing the Echo Nest web API.
"""

ECHO_NEST_API_KEY = None

__version__ = "$Revision: 0 $"
# $Source$

import os

if(os.environ['ECHO_NEST_API_KEY']):
    ECHO_NEST_API_KEY = os.environ['ECHO_NEST_API_KEY']
else:
    ECHO_NEST_API_KEY = None


API_HOST = 'developer.echonest.com'
API_SELECTOR = '/api/'
"Locations for the Analyze API calls."

HTTP_USER_AGENT = 'PyENAPI'
"""
You may change this to be a user agent string of your
own choosing.
"""

MP3_BITRATE = 192
"""
Default bitrate for MP3 output. Conventionally an
integer divisible by 32kbits/sec.
"""

CACHE = True
"""
You may change this to False to prevent local caching
of API results.
"""
OBEY_RATE_LIMIT = True
"""
The Echo Nest limits users to 120 api calls per minute.
By default, pyechonest enforces this limit locally. Set this
variable to False to turn of local enforcement. The Echo Nest
api will still throttle you.
"""
@@ -153,27 +153,16 @@
  os%0A%0Aif(
-os.environ%5B
 'ECHO_NE
@@ -172,17 +172,30 @@
 API_KEY'
-%5D
+ in os.environ
 ):%0A    E
@@ -922,12 +922,13 @@
 tle you.%0A%22%22%22
+%0A

check if key even exists before going into os.environ