2018-09-17 00:27:00 +00:00
|
|
|
"""
|
|
|
|
oauthlib
|
|
|
|
~~~~~~~~
|
|
|
|
|
|
|
|
A generic, spec-compliant, thorough implementation of the OAuth
|
|
|
|
request-signing logic.
|
|
|
|
|
2022-01-24 04:07:52 +00:00
|
|
|
:copyright: (c) 2019 by The OAuthlib Community
|
2018-09-17 00:27:00 +00:00
|
|
|
:license: BSD, see LICENSE for details.
|
|
|
|
"""
|
2022-01-24 04:07:52 +00:00
|
|
|
import logging
|
|
|
|
from logging import NullHandler
|
2018-09-17 00:27:00 +00:00
|
|
|
|
|
|
|
__author__ = 'The OAuthlib Community'
|
2022-11-07 18:06:49 +00:00
|
|
|
__version__ = '3.2.2'
|
2018-09-17 00:27:00 +00:00
|
|
|
|
2022-01-24 04:07:52 +00:00
|
|
|
logging.getLogger('oauthlib').addHandler(NullHandler())
|
2018-09-17 00:27:00 +00:00
|
|
|
|
2022-01-24 04:07:52 +00:00
|
|
|
_DEBUG = False
|
2018-09-17 00:27:00 +00:00
|
|
|
|
2022-01-24 04:07:52 +00:00
|
|
|
def set_debug(debug_val):
|
|
|
|
"""Set value of debug flag
|
|
|
|
|
|
|
|
:param debug_val: Value to set. Must be a bool value.
|
|
|
|
"""
|
|
|
|
global _DEBUG
|
|
|
|
_DEBUG = debug_val
|
2018-09-17 00:27:00 +00:00
|
|
|
|
2022-01-24 04:07:52 +00:00
|
|
|
def get_debug():
|
|
|
|
"""Get debug mode value.
|
|
|
|
|
|
|
|
:return: `True` if debug mode is on, `False` otherwise
|
|
|
|
"""
|
|
|
|
return _DEBUG
|