| |
- abc.ABC(builtins.object)
-
- HashStorageAbstract
-
- HashPerFileStorage
- SingleFileHashesStorage
class HashPerFileStorage(HashStorageAbstract) |
|
This is a hash storage to save hash information one hash file for one data file |
|
- Method resolution order:
- HashPerFileStorage
- HashStorageAbstract
- abc.ABC
- builtins.object
Methods defined here:
- get_hash_file_name(self, data_file_name)
- This function is just for reporting.
To check if the data file has hash the function call `has_hash` should be made
- has_hash(self, data_file_name)
- Check if the hash for file data_file_name is already calculated
- load_hashes_info(self)
- Load hashes from file or other sources if there are already calculated ones which corresponce to the parameters of the class
- save_hashes_info(self)
- Save calculated hashes info to file(s) or other destination with a given format etc...
- set_hash(self, data_file_name, hash_value)
- Force re-hash should be accounted
Data and other attributes defined here:
- __abstractmethods__ = frozenset()
Methods inherited from HashStorageAbstract:
- __enter__(self)
- Ref: https://www.geeksforgeeks.org/with-statement-in-python/ - it looks fine for __enter__, but not for __exit__
- __exit__(self, exc_type, exc_value, traceback)
- Ref: https://stackoverflow.com/questions/22417323/how-do-enter-and-exit-work-in-python-decorator-classes
Ref: https://docs.python.org/3/reference/datamodel.html#object.__exit__
- __init__(self)
- Initialize self. See help(type(self)) for accurate signature.
Data descriptors inherited from HashStorageAbstract:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class HashStorageAbstract(abc.ABC) |
|
This is a base class for storages of hash information |
|
- Method resolution order:
- HashStorageAbstract
- abc.ABC
- builtins.object
Methods defined here:
- __enter__(self)
- Ref: https://www.geeksforgeeks.org/with-statement-in-python/ - it looks fine for __enter__, but not for __exit__
- __exit__(self, exc_type, exc_value, traceback)
- Ref: https://stackoverflow.com/questions/22417323/how-do-enter-and-exit-work-in-python-decorator-classes
Ref: https://docs.python.org/3/reference/datamodel.html#object.__exit__
- __init__(self)
- Initialize self. See help(type(self)) for accurate signature.
- get_hash_file_name(self, data_file_name)
- This function is just for reporting.
To check if the data file has hash the function call `has_hash` should be made
- has_hash(self, data_file_name)
- Check if the hash for file data_file_name is already calculated
- load_hashes_info(self)
- Load hashes from file or other sources if there are already calculated ones which corresponce to the parameters of the class
- save_hashes_info(self)
- Save calculated hashes info to file(s) or other destination with a given format etc...
- set_hash(self, data_file_name, hash_value)
- Force re-hash should be accounted
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes defined here:
- __abstractmethods__ = frozenset({'get_hash_file_name', 'has_hash', 'load_hashes_info', 'save_hashes_info', 'set_hash'})
|
class SingleFileHashesStorage(HashStorageAbstract) |
|
This is a hash information storage to save hash information in one hash file for many data files
This storage supports traditional hash files and json-storages. |
|
- Method resolution order:
- SingleFileHashesStorage
- HashStorageAbstract
- abc.ABC
- builtins.object
Methods defined here:
- __init__(self)
- Initialize self. See help(type(self)) for accurate signature.
- get_hash_file_name(self, _)
- This function is just for reporting.
To check if the data file has hash the function call `has_hash` should be made
- has_hash(self, data_file_name)
- Check if the hash for file data_file_name is already calculated
- load_hashes_info(self)
- Load hashes from file or other sources if there are already calculated ones which corresponce to the parameters of the class
- save_hashes_info(self)
- Save calculated hashes info to file(s) or other destination with a given format etc...
- set_hash(self, data_file_name, hash_value)
- Force re-hash should be accounted
Data and other attributes defined here:
- __abstractmethods__ = frozenset()
Methods inherited from HashStorageAbstract:
- __enter__(self)
- Ref: https://www.geeksforgeeks.org/with-statement-in-python/ - it looks fine for __enter__, but not for __exit__
- __exit__(self, exc_type, exc_value, traceback)
- Ref: https://stackoverflow.com/questions/22417323/how-do-enter-and-exit-work-in-python-decorator-classes
Ref: https://docs.python.org/3/reference/datamodel.html#object.__exit__
Data descriptors inherited from HashStorageAbstract:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |