first commit

This commit is contained in:
2025-08-12 10:16:29 +03:00
commit 60b28bf122
21 changed files with 1492 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
from dataclasses import dataclass
@dataclass(frozen=True)
class File:
"""
A class representing file information.
Attrs:
- hash (str): File hash.
- name (str): File name.
- size (int): File size in bytes.
- downloads (int | None): Number of downloads.
- url (str): File URL.
"""
hash: str
name: str
size: int
downloads: int | None = 0
@property
def url(self) -> str:
return f"https://vikingfile.com/f/{self.hash}"