Skip to main content

Production-grade Python AI Infrastructure SDK with provider-agnostic interface

Project description

Neuravo

A provider-agnostic Python SDK for AI model interactions — write your chat logic once, run it against AWS Bedrock or OpenAI interchangeably, with retry logic, streaming, observability, and cost tracking built in.

Tests Lint License: MIT Python 3.10+

Why Neuravo?

Every LLM provider's SDK looks slightly different — different auth patterns, different response shapes, different streaming mechanics. Neuravo puts one consistent interface in front of them: the same Client, the same ChatResponse, the same retry and error-handling behavior, regardless of which vendor is actually answering the request. Switching providers is a one-string change (Config(provider="bedrock")Config(provider="openai")); nothing else in your application code changes.

Features

  • Provider-agnostic — Bedrock and OpenAI today, both implementing the identical BaseProvider contract, so they're interchangeable
  • Production-ready core — automatic retry with exponential backoff, configurable timeouts, a normalized exception hierarchy (no vendor-specific except clauses in your code)
  • Streaming — progressive response delivery via async for
  • Type-safe — full type hints, mypy --strict clean, ships py.typed
  • Observability — nested tracing spans, named metrics (counters/gauges/ histograms), in-process request monitoring, and a CloudWatch exporter
  • Cost tracking — per-call and running-total USD cost from token usage
  • Evaluation — run prompt/expected-output cases through a client and score the responses with pluggable scorers
  • Prompt management — named, versioned prompt templates
  • Benchmarking — latency statistics (mean, percentiles) over repeated calls
  • Security — prompt-level block-list checks and output redaction
  • Workflow engine — chain multi-step operations over a shared context
  • Plugins — third-party providers register via standard Python entry points
  • Sensitive-data redaction — API keys, tokens, and credentials are automatically stripped from log output

Installation

pip install neuravo

Using OpenAI instead of (or alongside) Bedrock:

pip install "neuravo[openai]"

Quick Start

import asyncio
from neuravo import Client, Config


async def main():
    client = Client(Config(provider="bedrock", region="us-east-1"))
    try:
        response = await client.chat("What is machine learning?")
        print(response.content)
    finally:
        await client.close()


asyncio.run(main())

Streaming instead of waiting for the full response:

async for chunk in client.stream("Tell me a story"):
    print(chunk.content, end="", flush=True)

Switching to OpenAI is a one-line change:

client = Client(Config(provider="openai", model="gpt-4o-mini"))

Examples

Runnable, self-contained scripts in examples/:

Script Demonstrates
hello_world.py The smallest possible chat call
chat.py Multi-turn conversation with history
streaming.py Streaming a response progressively
aws_bedrock.py Bedrock-specific config, model discovery, health checks
observability.py Tracing, metrics, and cost tracking around a call
python examples/hello_world.py

Supported Providers

Provider provider value Install
AWS Bedrock "bedrock" included by default
OpenAI "openai" pip install "neuravo[openai]"

See docs/providers.md for available models and per-provider setup details.

Documentation

Roadmap

The capabilities above (observability, cost tracking, evaluation, prompt management, benchmarking, security, workflows, plugins) are already real, working, tested code on main — not a future promise. The package version hasn't been formally bumped past 0.1.0 yet. See docs/roadmap.md for exactly what's shipped versus what's still a placeholder (cache/, rate limiting, agents/, embeddings/, memory/).

Contributing

See CONTRIBUTING.md for development setup, running tests/ lint/type-checks, and — especially — the steps for adding a new provider.

Please also read the Code of Conduct. For security issues, see SECURITY.md rather than opening a public issue.

License

MIT

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

neuravo-0.1.0.tar.gz (80.3 kB view details)

Uploaded Source

Built Distribution

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

neuravo-0.1.0-py3-none-any.whl (62.8 kB view details)

Uploaded Python 3

File details

Details for the file neuravo-0.1.0.tar.gz.

File metadata

  • Download URL: neuravo-0.1.0.tar.gz
  • Upload date:
  • Size: 80.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for neuravo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4a8394d4788a1bb9260addbc0b93feda6ec7fceb129077e10a53e3fa38a2281d
MD5 af3b81a4a47173088254a590a4673e2c
BLAKE2b-256 ea934cfdc8ed9063c0d9daf0f52d663a417605df97beb4e5742d2bb77af8821d

See more details on using hashes here.

Provenance

The following attestation bundles were made for neuravo-0.1.0.tar.gz:

Publisher: publish.yml on DHILIP-S-E/Neuravo

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

File details

Details for the file neuravo-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: neuravo-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 62.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for neuravo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 049ec314f8586f8d951ed64e06129e0087e9f95fbca1bb784292120241f52744
MD5 f65b3f1d30424b505e11d17f1c69bb89
BLAKE2b-256 6066a2ae1d76a123ce8134cfd1ff93463e6e72f9e1a13750fd4ef7abef211093

See more details on using hashes here.

Provenance

The following attestation bundles were made for neuravo-0.1.0-py3-none-any.whl:

Publisher: publish.yml on DHILIP-S-E/Neuravo

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