2018-09-17 08:27:00 +08:00
|
|
|
"""
|
|
|
|
oauthlib
|
|
|
|
~~~~~~~~
|
|
|
|
|
|
|
|
A generic, spec-compliant, thorough implementation of the OAuth
|
|
|
|
request-signing logic.
|
|
|
|
|
2022-01-24 12:07:52 +08:00
|
|
|
:copyright: (c) 2019 by The OAuthlib Community
|
2018-09-17 08:27:00 +08:00
|
|
|
:license: BSD, see LICENSE for details.
|
|
|
|
"""
|
2022-01-24 12:07:52 +08:00
|
|
|
import logging
|
|
|
|
from logging import NullHandler
|
2018-09-17 08:27:00 +08:00
|
|
|
|
|
|
|
__author__ = 'The OAuthlib Community'
|
2022-11-08 02:06:49 +08:00
|
|
|
__version__ = '3.2.2'
|
2018-09-17 08:27:00 +08:00
|
|
|
|
2022-01-24 12:07:52 +08:00
|
|
|
logging.getLogger('oauthlib').addHandler(NullHandler())
|
2018-09-17 08:27:00 +08:00
|
|
|
|
2022-01-24 12:07:52 +08:00
|
|
|
_DEBUG = False
|
2018-09-17 08:27:00 +08:00
|
|
|
|
2022-01-24 12:07:52 +08: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 08:27:00 +08:00
|
|
|
|
2022-01-24 12:07:52 +08:00
|
|
|
def get_debug():
|
|
|
|
"""Get debug mode value.
|
|
|
|
|
|
|
|
:return: `True` if debug mode is on, `False` otherwise
|
|
|
|
"""
|
|
|
|
return _DEBUG
|