LangChain document loader for Lyrenth: read URLs as clean AIDocuments.
Project description
langchain-lyrenth
A LangChain document loader backed by Lyrenth. Reads any URL as a clean AIDocument: cleaned Markdown plus title, description, and structure, with navigation and boilerplate stripped, through Lyrenth's cached index.
Install
pip install langchain-lyrenth
Get a free API key at https://lyrenth.com/signup and set it as
LYRENTH_API_KEY.
Usage
from langchain_lyrenth import LyrenthLoader
loader = LyrenthLoader(
["https://example.com/a", "https://example.com/b"]
)
docs = loader.load() # list[langchain_core.documents.Document]
# docs[0].page_content -> cleaned Markdown
# docs[0].metadata -> {"source", "title", "description", "word_count"}
lazy_load() streams one Document per URL. Pass fresh=True to force a live
re-fetch instead of the cached copy, or client= to reuse a configured
lyrenth.Lyrenth.
Why
- Cleaner, cheaper input for RAG: one stable shape per URL, far fewer tokens than raw HTML.
- Cached across callers, so repeat URLs are fast and origin-friendly.
The AIDocument format is an open contract; see https://lyrenth.com/llms-full.txt. MIT licensed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_lyrenth-0.1.0.tar.gz.
File metadata
- Download URL: langchain_lyrenth-0.1.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0047bafcd3d11f5ed5b6389b7bf10bd794944bc76a956a46437763cc3ddd4da
|
|
| MD5 |
954d1f1838bc190d51d96e2dfab32dc6
|
|
| BLAKE2b-256 |
da6bfd81ec302c07f665b28b9ab8ac7fa76da062e9b804c93c76e07ab7c10dfa
|
File details
Details for the file langchain_lyrenth-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_lyrenth-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c940e2661a225fb91d8747a7aeb35fe491ca33dd27ba26f7cec7dfa42db56999
|
|
| MD5 |
24ae7989b0c47550063b428aa6d1a0af
|
|
| BLAKE2b-256 |
1da3b646ed857d1d4e90c56b3776e93f98df1f1531457d318f8cde5a627dd403
|