/src/pyechonest/pyechonest/config.py

http://echo-nest-remix.googlecode.com/ · Python · 49 lines · 16 code · 12 blank · 21 comment · 2 complexity · 5ee92172a9ed7160b29740a3b49904ca MD5 · raw file

  1. #!/usr/bin/env python
  2. # encoding: utf-8
  3. """
  4. Copyright (c) 2010 The Echo Nest. All rights reserved.
  5. Created by Tyler Williams on 2010-04-25.
  6. Global configuration variables for accessing the Echo Nest web API.
  7. """
  8. __version__ = "4.2.15"
  9. import os
  10. if('ECHO_NEST_API_KEY' in os.environ):
  11. ECHO_NEST_API_KEY = os.environ['ECHO_NEST_API_KEY']
  12. else:
  13. ECHO_NEST_API_KEY = None
  14. API_HOST = 'developer.echonest.com'
  15. "The API endpoint you're talking to"
  16. API_SELECTOR = 'api'
  17. "API selector... just 'api' for now"
  18. API_VERSION = 'v4'
  19. "Version of api to use... only 4 for now"
  20. HTTP_USER_AGENT = 'PyEchonest'
  21. """
  22. You may change this to be a user agent string of your
  23. own choosing
  24. """
  25. TRACE_API_CALLS = False
  26. """
  27. If true, API calls will be traced to the console
  28. """
  29. CALL_TIMEOUT = 10
  30. """
  31. The API call timeout (seconds)
  32. """
  33. CODEGEN_BINARY_OVERRIDE = None
  34. """
  35. 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
  36. """