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.2.0b1.tar.gz (163.7 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.2.0b1-py3-none-any.whl (43.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ezrag-0.2.0b1.tar.gz
  • Upload date:
  • Size: 163.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ezrag-0.2.0b1.tar.gz
Algorithm Hash digest
SHA256 d7786ce7e542bf62528a8809701c6db3fb6c98d5286241acf8e83fca4e1bc559
MD5 648a1275f588c68dff8513e110af10a3
BLAKE2b-256 81a778ac259ac64a340e498a250cf49a0d03b6c6f95c12187f8cdfb96ebd594c

See more details on using hashes here.

Provenance

The following attestation bundles were made for ezrag-0.2.0b1.tar.gz:

Publisher: publish-pypi.yml on manuarmillas/ezrag

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: ezrag-0.2.0b1-py3-none-any.whl
  • Upload date:
  • Size: 43.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ezrag-0.2.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 fbcd30547f43b46deb720cec8532f734a7cb4da438205b18662fd15d9a5064f4
MD5 dbc3269c3a10783a00b0702df9f49c00
BLAKE2b-256 4c249458d5ba73a27ec26057a054af583908821822cb303979ddc35010b27f56

See more details on using hashes here.

Provenance

The following attestation bundles were made for ezrag-0.2.0b1-py3-none-any.whl:

Publisher: publish-pypi.yml on manuarmillas/ezrag

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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