utils
submodule
- almasru.utils.analyse_records(mms_ids: List[str], filepath: str | None = None) DataFrame
Use a list of MMS ID to analyse the records and return a
pandas.DataFrame
with the results.Main difference with
check_removable_records()
is that this function will check all parameters.- Parameters:
mms_ids – list of MMS ID to analyse
filepath – Optional string with a path to an Excel file to save automatically each checked record
- Returns:
pandas.DataFrame
containing the results of the analysis
- almasru.utils.check_removable_records(mms_ids: List[str], filepath: str | None = None) DataFrame
Check removable records for a list of MMS ID
Not all parameters are always checked. The system stop to check once one parameter is found preventing the deletion.
- Parameters:
mms_ids – List of MMS ID of records to check through SRU
filepath – Optional string with a path to an Excel file to save automatically each checked record
- Returns:
pandas.DataFrame
containing the results of the analysis
- almasru.utils.remove_ns(data: Element) Element
Remove namespace from XML data :param data: etree.Element object with xml data :return: etree.Element without namespace information :rtype:
- almasru.utils.roman_to_int(roman_number: str) int
Transform roman number to integer :param roman_number: roman number :return: int value of the number