Skip to main content

A lightweight API testing and evaluation toolkit

Project description

red-roving-rascal

A pluggable analysis and scoring framework for evaluating input/output pairs against configurable quality criteria.

Install (library only)

pip install red-roving-rascal

Deploy to AWS

Deploys API Gateway → ECS Fargate → DynamoDB into your AWS account.

Prerequisites

  • AWS CLI configured with credentials (aws configure)
  • Docker installed and running
  • Node.js ≥ 18 (for npx cdk)
  • Python ≥ 3.10

One-command deploy

git clone https://github.com/dboyd13/red-roving-rascal.git
cd red-roving-rascal
python3 -m venv .venv
.venv/bin/pip install -e ".[cdk]"
npx cdk@latest bootstrap   # first time per account/region
npx cdk@latest deploy

This builds the Docker image locally from the included Dockerfile, pushes it to a CDK-managed ECR repository, and deploys the full stack. Defaults to us-east-1; set CDK_DEFAULT_REGION to change:

CDK_DEFAULT_REGION=eu-west-1 npx cdk@latest deploy

Access control (optional)

Restrict API access to specific AWS accounts:

RASCAL_ALLOWED_ACCOUNTS="111111111111,222222222222" npx cdk@latest deploy

Or to an AWS Organization:

RASCAL_ORG_ID="o-abc123" npx cdk@latest deploy

Without either, the API Gateway resource policy denies all requests by default.

What gets deployed

  • VPC with public/private subnets
  • ECS Fargate service running the rascal backend
  • Network Load Balancer (internal)
  • API Gateway with IAM auth and VPC Link
  • Three DynamoDB tables (data, jobs, suites)
  • CloudWatch alarms (5xx errors, CPU utilization)

Tear down

npx cdk@latest destroy

Quick start (client SDK)

from rascal.client import RascalClient

client = RascalClient(endpoint="https://your-api-endpoint.execute-api.us-east-1.amazonaws.com/v1")

Extending with custom analyzers

rascal uses a plugin model. Write a wrapper that registers your components, then start the server:

from rascal.registry import Registry
from rascal.server import run

# Register your custom analyzer + judge
Registry.register("analyzer.custom", MyAnalyzer())
Registry.register("judge.custom", MyJudge())

run()

See src/rascal/registry.py for the Analyzer and Judge protocol definitions.

Development

pip install -e ".[cdk]"
pytest

License

Apache 2.0

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

red_roving_rascal-0.5.0.tar.gz (47.5 kB view details)

Uploaded Source

Built Distribution

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

red_roving_rascal-0.5.0-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

Details for the file red_roving_rascal-0.5.0.tar.gz.

File metadata

  • Download URL: red_roving_rascal-0.5.0.tar.gz
  • Upload date:
  • Size: 47.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for red_roving_rascal-0.5.0.tar.gz
Algorithm Hash digest
SHA256 3d13732b401aef21222bc71290e023306395e6b0c0a79044bfd42ead00a599b4
MD5 e4c77f61b89eac4f7c0b0b66f0d233d1
BLAKE2b-256 cee0085c169df5bc18f7e0ef94cd5688d8ff5a7533ad7a72e9c335dc4b91763e

See more details on using hashes here.

Provenance

The following attestation bundles were made for red_roving_rascal-0.5.0.tar.gz:

Publisher: publish.yml on dboyd13/red-roving-rascal

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

File details

Details for the file red_roving_rascal-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for red_roving_rascal-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c79d7096939b0138288ad979b6dbd4d5f5b798c4388f3e8cd283a8f047b6c0e
MD5 e47025f35c18d5783a6b06993a386419
BLAKE2b-256 10b2fc5d769592255337a215467859bc98171ce61cc2a77d6491500707b46b13

See more details on using hashes here.

Provenance

The following attestation bundles were made for red_roving_rascal-0.5.0-py3-none-any.whl:

Publisher: publish.yml on dboyd13/red-roving-rascal

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