Module: loaders/lutilities.py

Purpose:

This module provides loader-specific utility functions for the project.

Platform:

Linux/Windows | Python 3.10+

Developer:

J Berendt

Email:

development@s3dev.uk

Comments:

This module is here (in the docp/loaders) directory rather than merged with the docp/parsers/putilities.py module as the loaders’ dependencies are heavy. Keeping the loader functionality separate helps to ease the dependency requirements for parser-only projects.

class LoaderUtilities[source]

Bases: object

Loader-based (cross-project) utility functions.

get_loader(path: str) ChromaPDFLoader | ChromaPPTXLoader[source]

Return the appropriate loader for the file type.

Parameters:

path (str) – Full path to the file to be tested.

Returns:

The appropriate loader for the file, given the file signature; this test is not file extension based.

Return type:

ChromaPDFLoader | ChromaPPTXLoader