Skip to main content

Aviora

AI Search Framework powered by Tavily
Build AI agents and RAG pipelines with real-time web search in minutes.

PyPI Downloads Python versions License


Why Aviora?

  • Real-time web search — powered by Tavily's AI-optimized search index
  • Sync & async — native async/await support for every method
  • RAG-ready — get_search_context() returns a clean text blob for LLM context windows
  • Q&A search — qna_search() returns a single direct answer string
  • Extract & crawl — pull clean content from any URL or entire websites
  • Typed — full TypedDict return types for IDE autocompletion
  • Simple error handling — AvioraAuthError, AvioraRateLimitError

Installation

pip install aviora

Get a free Tavily API key at tavily.com.


Quick Start

from aviora import Aviora

client = Aviora(api_key="tvly-xxxx")

results = client.search("Latest AI news")

for r in results:
    print(r["title"], r["url"])

All Features

results = client.search(
    "OpenAI GPT-5 release date",
    max_results=10,
    search_depth="advanced",    # "basic" | "advanced"
    topic="general",             # "general" | "news"
    include_domains=["techcrunch.com", "wired.com"],
    exclude_domains=["reddit.com"],
)

for r in results:
    print(r["title"])   # page title
    print(r["url"])     # source URL
    print(r["content"]) # relevant snippet
    print(r["score"])   # relevance score (0–1)

Direct Q&A

Get a single-sentence answer instead of a list of links:

answer = client.qna_search("Who is the CEO of OpenAI?")
print(answer)  # "Sam Altman"

RAG Context

Get a clean text blob ready to drop straight into an LLM prompt:

context = client.get_search_context(
    "Explain transformer attention mechanisms",
    max_tokens=4000,
)

prompt = f"Answer the question using this context:\n\n{context}\n\nQuestion: ..."

Extract Content from URLs

results = client.extract(["https://openai.com/blog/gpt-4"])

for r in results:
    print(r["url"])
    print(r["raw_content"])

Crawl a Website

pages = client.crawl(
    "https://docs.python.org",
    max_depth=2,
    max_breadth=10,
    limit=50,
)

Map a Website

urls = client.map("https://docs.python.org")
print(urls)  # ["https://docs.python.org/3/", ...]

Async Support

Every method has an async_ counterpart, perfect for use inside FastAPI, LangChain agents, or any async framework:

import asyncio
from aviora import Aviora

client = Aviora(api_key="tvly-xxxx")

async def main():
    # Run multiple searches concurrently
    results, answer, context = await asyncio.gather(
        client.async_search("AI news today"),
        client.async_qna_search("What is LangGraph?"),
        client.async_get_search_context("RAG pipeline best practices"),
    )
    print(results)
    print(answer)
    print(context)

asyncio.run(main())

Error Handling

from aviora import Aviora, AvioraAuthError, AvioraRateLimitError, AvioraError

client = Aviora(api_key="tvly-xxxx")

try:
    results = client.search("AI news")
except AvioraAuthError:
    print("Invalid API key")
except AvioraRateLimitError:
    print("Rate limit hit — upgrade at tavily.com")
except AvioraError as e:
    print(f"Search failed: {e}")

Use with LangChain / LLM Agents

Aviora's get_search_context and qna_search methods integrate naturally into any LLM agent:

from aviora import Aviora

client = Aviora(api_key="tvly-xxxx")

def search_tool(query: str) -> str:
    """Tool used by an LLM agent to search the web."""
    return client.get_search_context(query, max_tokens=2000)

API Reference

Method Description
search(query, ...) Web search → list[SearchResult]
qna_search(query) Direct answer → str
get_search_context(query, max_tokens) RAG context → str
extract(urls) Extract page content → list[ExtractResult]
crawl(url, ...) Crawl a site → list[dict]
map(url) Discover site URLs → list[str]
async_search(...) Async version of search
async_qna_search(...) Async version of qna_search
async_get_search_context(...) Async version of get_search_context
async_extract(...) Async version of extract

License

MIT © Syed Faisal

Metadata

Release files for aviora 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aviora 0.2.0
File Size Uploaded Provenance Actions
aviora-0.2.0.tar.gz 9.6 kB Without provenance Details for aviora-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aviora 0.2.0
File Interpreter ABI Platform Actions
aviora-0.2.0-py3-none-any.whl Python 3 none any Details for aviora-0.2.0-py3-none-any.whl

Total release size: 17.4 kB

Release files / aviora-0.2.0.tar.gz

Download URL aviora-0.2.0.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0389969a02d1f7e029cdfaed5e3f1c06fe4f6965c4acb2dc2711101c73d7d11d
BLAKE2b-256 checksum
How to use checksums
bd4a57431f0968af0c5270e29d0cef85ef356b17a7179fc4367229a4e01f6ddb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / aviora-0.2.0-py3-none-any.whl

Download URL aviora-0.2.0-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cbec6e907503657c1e3f6e35a7e926b5b26ace784e27b1988743da129c057a9c
BLAKE2b-256 checksum
How to use checksums
13ab470d550d140abb7cb07caaad8c033367ec82a8b8a11854b487a0f8287f6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Security for aviora 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page