Configuration Reference
On this page
All configuration in document_loaders is expressed as dataclasses in config_loader.py. Every loader accepts a config object or a subset of common fields as direct constructor keyword arguments (which the loader uses to build a default config internally). Passing config= explicitly always takes precedence — direct kwargs are only used when config is None.
LoaderType (Enum)
Identifies every loader format the package understands for dispatch purposes (used by EXTENSION_MAP, AutoLoader, and DirectoryLoader).
class LoaderType(Enum):
TEXT = "text"
PDF = "pdf"
DOCX = "docx"
CSV = "csv"
EXCEL = "excel"
JSON = "json"
JSONL = "jsonl"
HTML = "html"
MARKDOWN = "markdown"
WEB = "web"
SITEMAP = "sitemap"
DIRECTORY = "directory"
AUTO = "auto"
[!WARNING] Declared but unused values
SITEMAPandAUTOare defined in the enum but no loader implementation maps to them inEXTENSION_MAPorAutoLoader._create_file_loader(). There is no sitemap-parsing loader in this codebase despite the enum value existing.
EXTENSION_MAP
Dict[str, LoaderType] — the single source of truth for file-extension → loader-type dispatch, used by both AutoLoader and DirectoryLoader.
TextLoaderConfig
Used by TextLoader.
PDFLoaderConfig
Used by PDFLoader.
DocxLoaderConfig
Used by DocxLoader.
CSVLoaderConfig
Used by CSVLoader.
JSONLoaderConfig
Used by JSONLoader. (JSONLinesLoader does not use this dataclass — it takes its equivalent options as direct constructor parameters.)
HTMLLoaderConfig
Used by HTMLLoader, HTMLStringLoader, and internally by WebLoader (which constructs its own instance with a fixed tag list).
WebLoaderConfig
Used by WebLoader and MultiURLLoader.
DirectoryLoaderConfig
Used by DirectoryLoader.
LoaderConfig
A master container holding one default instance of every sub-config above. Not currently consumed by any loader constructor — none of the loader classes accept a LoaderConfig; each loader takes its own specific *Config type directly. It exists as a convenience aggregate, e.g. for applications that want to manage one configuration object for an entire pipeline.
@dataclass
class LoaderConfig:
text: TextLoaderConfig
pdf: PDFLoaderConfig
docx: DocxLoaderConfig
csv: CSVLoaderConfig
json: JSONLoaderConfig
html: HTMLLoaderConfig
web: WebLoaderConfig
directory: DirectoryLoaderConfig
GraphLoaderConfig and TableLoaderConfig
These live in graph_loader.py and table_loader.py respectively (not config_loader.py) and are documented alongside their loaders:
Usage pattern
from zerda.document_loaders import CSVLoader, CSVLoaderConfig
config = CSVLoaderConfig(
content_columns=["title", "body"],
metadata_columns=["author", "published_date"],
max_rows=1000,
)
loader = CSVLoader("articles.csv", config=config)
docs = loader.load()