[+] AnixartAccountSaved

This commit is contained in:
2025-04-02 16:02:01 +03:00
parent 68e45336ad
commit 29205efe4f
2 changed files with 3 additions and 3 deletions

View File

@@ -1 +1 @@
from .account import AnixartAccount, AnixartAccountToken
from .account import AnixartAccount, AnixartAccountSaved, AnixartAccountToken

View File

@@ -28,14 +28,14 @@ class AnixartAccount:
def token(self):
return self._token
def to_file(self, filename: str | Path):
def to_file(self, filename: str | Path) -> "AnixartAccountSaved":
"""Save the account information to a file."""
acc = AnixartAccountSaved.from_account(filename, self)
acc.save()
return acc
@classmethod
def from_file(cls, filename: str | Path):
def from_file(cls, filename: str | Path) -> "AnixartAccountSaved":
"""Load the account information from a file."""
acc = AnixartAccountSaved(filename)
acc.load()