File: inputsizedfile.py

package info (click to toggle)
python-telethon 1.42.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,520 kB
  • sloc: python: 16,285; javascript: 200; makefile: 16; sh: 11
file content (9 lines) | stat: -rw-r--r-- 310 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
from ..types import InputFile


class InputSizedFile(InputFile):
    """InputFile class with two extra parameters: md5 (digest) and size"""
    def __init__(self, id_, parts, name, md5, size):
        super().__init__(id_, parts, name, md5.hexdigest())
        self.md5 = md5.digest()
        self.size = size