Metadata-Version: 2.4
Name: raglib-py
Version: 0.1.3
Summary: A modular, production-grade Retrieval-Augmented Generation library
Project-URL: Homepage, https://github.com/himanshau/raglib
Project-URL: Repository, https://github.com/himanshau/raglib
Project-URL: Bug Tracker, https://github.com/himanshau/raglib/issues
Author: raglib maintainers
License: MIT License
        
        Copyright (c) 2026 raglib maintainers
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: ai,llm,nlp,rag,retrieval,vector-search
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Requires-Dist: duckduckgo-search>=3.9
Provides-Extra: all
Requires-Dist: chromadb>=0.5.0; extra == 'all'
Requires-Dist: langchain-anthropic>=0.1.0; extra == 'all'
Requires-Dist: langchain-core>=0.2.0; extra == 'all'
Requires-Dist: langchain-google-genai>=1.0.0; extra == 'all'
Requires-Dist: langchain-groq>=0.1.0; extra == 'all'
Requires-Dist: langchain-huggingface>=0.0.3; extra == 'all'
Requires-Dist: langchain-ollama>=0.1.0; extra == 'all'
Requires-Dist: langchain-openai>=0.1.0; extra == 'all'
Requires-Dist: pillow>=10.0.0; extra == 'all'
Requires-Dist: pymupdf>=1.23.0; extra == 'all'
Requires-Dist: pytesseract>=0.3.10; extra == 'all'
Requires-Dist: python-docx>=1.0.0; extra == 'all'
Requires-Dist: python-pptx>=0.6.21; extra == 'all'
Requires-Dist: sentence-transformers>=2.6.0; extra == 'all'
Provides-Extra: all-llm
Requires-Dist: langchain-anthropic>=0.1.0; extra == 'all-llm'
Requires-Dist: langchain-core>=0.2.0; extra == 'all-llm'
Requires-Dist: langchain-google-genai>=1.0.0; extra == 'all-llm'
Requires-Dist: langchain-groq>=0.1.0; extra == 'all-llm'
Requires-Dist: langchain-ollama>=0.1.0; extra == 'all-llm'
Requires-Dist: langchain-openai>=0.1.0; extra == 'all-llm'
Provides-Extra: anthropic
Requires-Dist: langchain-anthropic>=0.1.0; extra == 'anthropic'
Provides-Extra: chroma
Requires-Dist: chromadb>=0.5.0; extra == 'chroma'
Provides-Extra: dev
Requires-Dist: build>=1.0.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
Requires-Dist: pytest-mock>=3.11.0; extra == 'dev'
Requires-Dist: pytest>=7.4.0; extra == 'dev'
Requires-Dist: twine>=4.0.0; extra == 'dev'
Provides-Extra: docx
Requires-Dist: python-docx>=1.0.0; extra == 'docx'
Provides-Extra: faiss
Requires-Dist: faiss-cpu>=1.7.0; extra == 'faiss'
Provides-Extra: free-embed
Requires-Dist: langchain-huggingface>=0.0.3; extra == 'free-embed'
Requires-Dist: sentence-transformers>=2.6.0; extra == 'free-embed'
Provides-Extra: google
Requires-Dist: langchain-google-genai>=1.0.0; extra == 'google'
Provides-Extra: groq
Requires-Dist: langchain-groq>=0.1.0; extra == 'groq'
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.2.0; extra == 'langchain'
Provides-Extra: ocr
Requires-Dist: pillow>=10.0.0; extra == 'ocr'
Requires-Dist: pytesseract>=0.3.10; extra == 'ocr'
Provides-Extra: ollama
Requires-Dist: langchain-ollama>=0.1.0; extra == 'ollama'
Provides-Extra: openai
Requires-Dist: langchain-openai>=0.1.0; extra == 'openai'
Provides-Extra: pdf
Requires-Dist: pymupdf>=1.23.0; extra == 'pdf'
Provides-Extra: pptx
Requires-Dist: python-pptx>=0.6.21; extra == 'pptx'
Provides-Extra: serpapi
Requires-Dist: google-search-results>=2.4.0; extra == 'serpapi'
Provides-Extra: tavily
Requires-Dist: tavily-python>=0.2.0; extra == 'tavily'
Provides-Extra: vision
Requires-Dist: langchain-anthropic>=0.1.0; extra == 'vision'
Requires-Dist: langchain-google-genai>=1.0.0; extra == 'vision'
Requires-Dist: langchain-openai>=0.1.0; extra == 'vision'
Description-Content-Type: text/markdown

# raglib

raglib is a modular, production-grade Python library for Retrieval-Augmented Generation (RAG).

## Installation

Install from PyPI:

pip install raglib-py

Install with optional extras:

pip install raglib-py[tavily,serpapi,faiss]

## Quick import check

python -c "from raglib.rag_types.naive_rag import NaiveRAG; print('Import successful')"

## One-line API quickstart

```python
from raglib import RAG

rag = RAG("my_documents/")
result = rag.query("What is this report about?")

print(result.answer)
print(result.sources)
```

You can also add more sources later:

```python
rag.add("new_data.docx")
rag.add("https://example.com/article")
```

## Features

- Modular retrieval components (vector, web, hybrid, routing, multi-query, multi-hop)
- RAG strategy orchestrators (naive, advanced, corrective, self, agentic, and more)
- Mock LLM client for offline testing
- Provider abstraction with fallback chaining
- Full test suite with unit, integration, e2e, and edge coverage

## Detailed usage guide

See docs/USAGE.md for a full Python usage guide with quickstart, component wiring, and advanced orchestrator examples.

## License

MIT
