__init__.py 686 B

12345678910111213141516171819202122232425262728293031323334
  1. """
  2. oauthlib
  3. ~~~~~~~~
  4. A generic, spec-compliant, thorough implementation of the OAuth
  5. request-signing logic.
  6. :copyright: (c) 2019 by The OAuthlib Community
  7. :license: BSD, see LICENSE for details.
  8. """
  9. import logging
  10. from logging import NullHandler
  11. __author__ = 'The OAuthlib Community'
  12. __version__ = '3.2.2'
  13. logging.getLogger('oauthlib').addHandler(NullHandler())
  14. _DEBUG = False
  15. def set_debug(debug_val):
  16. """Set value of debug flag
  17. :param debug_val: Value to set. Must be a bool value.
  18. """
  19. global _DEBUG
  20. _DEBUG = debug_val
  21. def get_debug():
  22. """Get debug mode value.
  23. :return: `True` if debug mode is on, `False` otherwise
  24. """
  25. return _DEBUG