from typing import Union
from pathlib import Path
from typing import Tuple


def get_file_parts(input_filename: Union[str, Path]) -> Tuple[str, str, str]:
    """
    Gets directory path, name, and extension from a filename
    Parameters
    ----------
    input_filename

    Returns
    -------
    (path, name, extension)
    """
    input_filename = Path(input_filename)
    path = str(input_filename.parent)
    extension = input_filename.suffix
    name = input_filename.stem
    return path, name, extension