mirror of
https://github.com/Noettore/lagomareGateKeeperBot.git
synced 2025-10-14 19:16:40 +02:00
11 lines
364 B
Python
11 lines
364 B
Python
class Credential:
|
|
def __init__(self, username: str, password: str):
|
|
self.username = username
|
|
self.password = password
|
|
|
|
def to_dict(self) -> dict:
|
|
return {"username": self.username, "password": self.password}
|
|
|
|
@classmethod
|
|
def from_dict(cls, data: dict):
|
|
return cls(data.get("username", ""), data.get("password", "")) |