Skip to main content


A reStructured Text (RST) file is a file format for textual data used primarily in the Python programming language community for technical documentation.


You can load data from RST files with UnstructuredRSTLoader using the following workflow.

from langchain_community.document_loaders import UnstructuredRSTLoader
API Reference:UnstructuredRSTLoader
loader = UnstructuredRSTLoader(file_path="example_data/README.rst", mode="elements")
docs = loader.load()
page_content='Example Docs' metadata={'source': 'example_data/README.rst', 'filename': 'README.rst', 'file_directory': 'example_data', 'filetype': 'text/x-rst', 'page_number': 1, 'category': 'Title'}

Was this page helpful?

You can also leave detailed feedback on GitHub.