1
0
ScrapTheChan/scrapthechan/fileinfo.py

24 lines
533 B
Python
Raw Normal View History

"""FileInfo object stores information about a file."""
2020-07-08 22:53:39 +04:00
from dataclasses import dataclass
2020-07-08 22:53:39 +04:00
__all__ = ["FileInfo"]
@dataclass(frozen=True, order=True)
2020-07-08 22:53:39 +04:00
class FileInfo:
"""Stores information about a file.
2020-07-08 22:53:39 +04:00
Fields:
- `name` -- name of a file;
- `size` -- size of a file;
- `download_url` -- full download URL for a file;
- `hash_value` -- hash sum of a file;
- `hash_algorithm` -- hash algorithm used (e.g. md5).
"""
name: str
size: int
download_url: str
hash_value: str
hash_algorithm: str