Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
supermeter / sdk / __init__.py
Size: Mime:
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)