import os class apikey_generator: """ This is ApiKey generator. """ def __new__(cls) -> str: """ It create new ApiKey, and return it as string. Returns: (str): New random ApiKey """ random = os.urandom(cls.size()) string = random.hex() return string def size() -> int: """ It return size of ApiKey in bytes. Returns: (int): Size of ApiKey in bytes """ return 128