bacommon.login

Functionality related to cloud based assets.

 1# Released under the MIT License. See LICENSE for details.
 2#
 3"""Functionality related to cloud based assets."""
 4
 5from __future__ import annotations
 6
 7from enum import Enum
 8from typing import TYPE_CHECKING
 9
10if TYPE_CHECKING:
11    pass
12
13
14class LoginType(Enum):
15    """Types of logins available."""
16
17    # Email/password
18    EMAIL = 'email'
19
20    # Google Play Game Services
21    GPGS = 'gpgs'
22
23    @property
24    def displayname(self) -> str:
25        """Human readable name for this value."""
26        cls = type(self)
27        match self:
28            case cls.EMAIL:
29                return 'Email/Password'
30            case cls.GPGS:
31                return 'Google Play Games'
class LoginType(enum.Enum):
15class LoginType(Enum):
16    """Types of logins available."""
17
18    # Email/password
19    EMAIL = 'email'
20
21    # Google Play Game Services
22    GPGS = 'gpgs'
23
24    @property
25    def displayname(self) -> str:
26        """Human readable name for this value."""
27        cls = type(self)
28        match self:
29            case cls.EMAIL:
30                return 'Email/Password'
31            case cls.GPGS:
32                return 'Google Play Games'

Types of logins available.

EMAIL = <LoginType.EMAIL: 'email'>
GPGS = <LoginType.GPGS: 'gpgs'>
displayname: str

Human readable name for this value.

Inherited Members
enum.Enum
name
value