Skip to main content

RST

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

UnstructuredRSTLoader

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()
print(docs[0])
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 leave detailed feedback on GitHub.