Utils
Utility functions used throughout the project.
get_repo_directory
get_repo_directory ()
get_data_directory
get_data_directory ()
get_latest_file
get_latest_file (directory:pathlib.Path)
Return the latest file, sorting by name for a given directory. Only returns files, not directories.
extract_file
extract_file (filepath:pathlib.Path)
extract_files
extract_files (filepath:pathlib.Path)
get_latest_directory
get_latest_directory (directory:pathlib.Path)
Return the latest subdirectory, sorting by name for a given directory. Only returns directories, not files.
read_file
read_file (filepath:pathlib.Path, format:str='json')
Read a file in either JSON or CSV format and return its contents.
append_to_file
append_to_file (filepath:pathlib.Path, record:dict)
extract_file_name
extract_file_name (path:pathlib.Path)