How about a simple Enum implementation like the following? No need for external libs!
import platform
from enum import Enum
class OS(Enum):
def checkPlatform(osName):
return osName.lower()== platform.system().lower()
MAC = checkPlatform("darwin")
LINUX = checkPlatform("linux")
WINDOWS = checkPlatform("windows") #I haven't test this one
Simply you can access with Enum value
if OS.LINUX.value:
print("Cool it is Linux")
P.S It is python3