Download Free Loader( Simple Directoryreader ) Page
: Uses parallel processing to speed up loading for large datasets (best on Linux/macOS). Supported File Types
from llama_index.core import SimpleDirectoryReader # Specify your data directory reader = SimpleDirectoryReader(input_dir="./my_data_folder") documents = reader.load_data() Use code with caution. download loader( simple directoryreader )
You can refine how the loader interacts with your files using these common parameters: : Uses parallel processing to speed up loading
If you have a unique file format, you can extend the reader by passing a file_extractor dictionary that maps extensions to custom reader classes. This allows you to use specialized tools like LlamaParse for complex PDFs while keeping the simplicity of the directory-wide scan. This allows you to use specialized tools like
The SimpleDirectoryReader is designed to be the easiest way to load data into a LlamaIndex project. It automatically detects file extensions and chooses the appropriate parser for formats like .txt , .pdf , .docx , .md , and .csv . To load all supported files from a specific folder:
Out of the box, SimpleDirectoryReader supports a wide array of formats including: : .pdf , .docx , .pptx , .xlsx Web/Text : .html , .md , .txt , .ipynb Data/Media : .csv , .json , .mp3 , .mp4 Extending with Custom Parsers