2020-11-18 23:48:38 +04:00
|
|
|
"""FileInfo object stores information about a file."""
|
2020-07-08 22:53:39 +04:00
|
|
|
|
2020-11-18 23:48:38 +04:00
|
|
|
from dataclasses import dataclass
|
2020-07-08 22:53:39 +04:00
|
|
|
|
|
|
|
__all__ = ["FileInfo"]
|
|
|
|
|
|
|
|
|
2021-05-03 02:36:17 +04:00
|
|
|
@dataclass(frozen=True, order=True)
|
2020-07-08 22:53:39 +04:00
|
|
|
class FileInfo:
|
2020-11-18 23:48:38 +04:00
|
|
|
"""Stores information about a file.
|
2020-07-08 22:53:39 +04:00
|
|
|
|
2020-11-18 23:48:38 +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
|