.ipynb
.pdf
Fauna
 Contents 
Query data example
Query with Pagination
Fauna#
Fauna is a Document Database.
Query Fauna documents
#!pip install fauna
Query data example#
from langchain.document_loaders.fauna import FaunaLoader
secret = "<enter-valid-fauna-secret>"
query = "Item.all()" # Fauna query. Assumes that the collection is called "Item"
field = "text" # The field that contains the page content. Assumes that the field is called "text"
loader = FaunaLoader(query, field, secret)
docs = loader.lazy_load()
for value in docs:
    print(value)
Query with Pagination#
You get a after value if there are more data. You can get values after the curcor by passing in the after string in query.
To learn more following this link
query = """
Item.paginate("hs+DzoPOg ... aY1hOohozrV7A")
Item.all()
"""
loader = FaunaLoader(query, field, secret)
previous
DuckDB
next
Figma
 Contents
  
Query data example
Query with Pagination
By Harrison Chase
    
      © Copyright 2023, Harrison Chase.
      
  Last updated on Jun 16, 2023.
rtdocs_stable/api.python.langchain.com/en/stable/modules/indexes/document_loaders/examples/fauna.html