Skip to main content

Async-first RAG SDK. The fastest way to build RAG applications with Python.

Project description

ezrag

A modular, hexagonal-architecture RAG SDK for Python.

Install

pip install ezrag
# optional extras
pip install "ezrag[openai]"   # OpenAI embeddings + generation
pip install "ezrag[ollama]"   # Ollama (local LLM) support
pip install "ezrag[firestore]" # Firestore vector store

Quickstart

import asyncio
from ezrag import rag, Document
from ezrag.embeddings import OpenAIEmbedder
from ezrag.stores import InMemoryVectorStore
from ezrag.generators import OpenAIGenerator

async def main() -> None:
    sdk = rag(
        embedder=OpenAIEmbedder(api_key="..."),
        store=InMemoryVectorStore(),
        generator=OpenAIGenerator(api_key="..."),
    )
    await sdk.ingest([Document(content="RAG combines retrieval with generation.")])
    result = await sdk.query("What is RAG?")
    answer = await sdk.generate("Explain RAG simply")
    print(result.results)
    print(answer.answer)

asyncio.run(main())

Documentation

Examples

Runnable scripts in examples/:

  • examples/local_memory.py — zero-service, local adapters
  • examples/openai_memory.py — OpenAI embedder + in-memory store
  • examples/ollama_memory.py — Ollama embedder + in-memory store
  • examples/openai_firestore.py — OpenAI embedder + Firestore store
  • examples/openai_pgvector.py — OpenAI embedder + PgVectorStore

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ezrag-0.1.0b1.tar.gz (149.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ezrag-0.1.0b1-py3-none-any.whl (42.0 kB view details)

Uploaded Python 3

File details

Details for the file ezrag-0.1.0b1.tar.gz.

File metadata

  • Download URL: ezrag-0.1.0b1.tar.gz
  • Upload date:
  • Size: 149.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for ezrag-0.1.0b1.tar.gz
Algorithm Hash digest
SHA256 a1f423d94d9a7e2b6570a59911e4817b3b9329b02a8325b62639e749ce3d9434
MD5 65c70bbc88e3667c601c3e2f9642e6f0
BLAKE2b-256 151bf893f50170670db15945b50b2fbdb7cd49d6fb9665b095a22a928c5aedd1

See more details on using hashes here.

File details

Details for the file ezrag-0.1.0b1-py3-none-any.whl.

File metadata

  • Download URL: ezrag-0.1.0b1-py3-none-any.whl
  • Upload date:
  • Size: 42.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for ezrag-0.1.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 915c49e70891109836b65782b863c426e4b7fd7585ae132655ff59b9d0e62963
MD5 81869fb7eabd0d5943fa0a0ecbb48d09
BLAKE2b-256 bdf623cfec6e410c1fbc1aea7dfaeb5339acfd7a10c9211023f1278ccff11c70

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page