Created modules and organized code

This commit is contained in:
2025-05-23 00:06:26 +02:00
parent 020b5e0193
commit 3088a75a7d
17 changed files with 340 additions and 248 deletions

11
models/credential.py Normal file
View File

@@ -0,0 +1,11 @@
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", ""))