Darktable2Piwigo
|
Public Member Functions | |
None | __init__ (self) |
Static Public Member Functions | |
DataFrame | calculate_hash (DataFrame df, list[str] hash_columns, str hash_name="hash") |
Public Attributes | |
transform | |
transform_fastapi | |
time_origin | |
Protected Member Functions | |
Callable[[Arg(DataFrame, "df"), KwArg(Any)], Union[DataFrame, List[Dict[Hashable, Any]]]] | _create_transform_func (self, bool fastapi_output) |
Union[DataFrame, List[Dict[Hashable, Any]]] | _transform (self, DataFrame df, bool fastapi_output, **kwargs) |
Static Protected Member Functions | |
str | _hash (list[str] x) |
Implements the transformer base class, including the calculate_hash method
None transformer_base.TransformerBase.__init__ | ( | self | ) |
|
protected |
Creates a function that wraps the `_transform` method and returns a function with the correct signature. :param fastapi_output: Whether the output should be formatted for FastAPI :return: A function that takes a DataFrame and keyword arguments and returns either a DataFrame or a list of dictionaries.
|
staticprotected |
Hashes a list of strings using the MD5 algorithm. The MD5 algorithm takes a list of strings and generates a 128-bit hash value. The hash value is then converted to a hexadecimal string and returned. :param x: The list of strings to be hashed :return: The hash value as a hexadecimal string
|
protected |
Implements the transform method
|
static |
Calculates a hash value from the given list of input columns. The hash value is calculated using the MD5 algorithm. The MD5 algorithm takes a list of strings and generates a 128-bit hash value. The hash value is then converted to a hexadecimal string. :param df: The DataFrame to be transformed :param hash_columns: The list of columns to be used for hashing :param hash_name: The name of the column to store the hash value :return: The DataFrame with the hash value added
transformer_base.TransformerBase.time_origin |
transformer_base.TransformerBase.transform |
transformer_base.TransformerBase.transform_fastapi |