Skip to main content

Python SDK for Redraven (fireraven.ai) — generate, run-against-client-LLM, and evaluate red-team tests.

Project description

redraven (Python SDK)

The official Python SDK for Redraven — the LLM red-teaming and policy-evaluation platform from fireraven.ai.

Redraven generates adversarial prompts, evaluates your LLM's responses against your safety policies and certifications, and surfaces failures so you can harden your AI products.

This SDK lets you drive the full Redraven flow from your own Python code:

  1. Generate (or pick) a test dataset on Redraven.
  2. Run each test case locally through your own LLM — your model API key never leaves your process.
  3. Submit responses back to Redraven for scoring; receive a summary you can act on.

The SDK talks only to public endpoints on the Redraven backend, authenticated with your organization API key (issued from the Redraven app).

Platforms

Installation

Install from PyPI:

uv add redraven
# or
pip install redraven

uv is preferred for reproducible installs.

Quick start

import asyncio
import redraven

async def my_llm(prompt: str) -> str:
    # Call your own LLM here. Your key stays in your process.
    return f"echo: {prompt}"

async def main():
    async with redraven.Client() as client:  # reads REDRAVEN_API_KEY + REDRAVEN_BASE_URL
        result = await client.run_test(
            test_id="<your-existing-test-id>",
            llm=my_llm,
            concurrency=4,
        )
        print(result.model_dump())

asyncio.run(main())

See README.users.md for the full user guide. The guide includes dataset-readiness semantics for generate_test(...) plus the one-call generate_and_run_test(...) workflow.

Documentation

License

Proprietary — © fireraven.ai. Contact us if you'd like to integrate Redraven into your product.

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

redraven-0.1.1.tar.gz (38.9 kB view details)

Uploaded Source

Built Distribution

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

redraven-0.1.1-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file redraven-0.1.1.tar.gz.

File metadata

  • Download URL: redraven-0.1.1.tar.gz
  • Upload date:
  • Size: 38.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for redraven-0.1.1.tar.gz
Algorithm Hash digest
SHA256 27c8efaac366dacceb475c417b8aee789b87696581e29ba2b7a87e4353aa5f38
MD5 827f87faa95dc612bc5499fa848b65b6
BLAKE2b-256 ca72c8c25e5a529ba1b30124aa9a573f039332820eaa4cad9f65f7d723d3e3a1

See more details on using hashes here.

File details

Details for the file redraven-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: redraven-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for redraven-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 340a2417f4910188f0a3053f0c66683e9dfa35ad373480aa0bd55fc25c8f31ab
MD5 7da0cd9a64889ca935d1e99407e1e09e
BLAKE2b-256 2cbb0cba61cf9257c2928d7aef457c3ac547591808f7700136d2822e6101f27e

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