Repository URL to install this package:
|
Version:
0.8.1 ▾
|
from supertenant import consts
from supertenant.supermeter.scope_manager import scope_manager
class SupertenantSDK(object):
"""
The Supertenant SDK.
"""
@classmethod
def set_tenant(cls, value):
# type: (str) -> bool
"""
Sets the tenant identifier for the current thread (or asyncio task).
Args:
value (string): The tenant identifier to set.
Returns:
True if the tenant identifier was set, False otherwise.
"""
if not scope_manager:
return False
return scope_manager.set_label_on_shared_data(consts.LABEL_SUPERTENANT_TENANT_ID, value)