Skip to main content

🟢 SOFE Server — FinOps Policy Engine API

REST API server for the SOFE (Stairway Open FinOps Engine). Wraps the SOFE Python engine in a FastAPI application, enabling HTTP-based evaluations.

Quick Start

pip install sofe sofe-server
sofe-server
# → http://localhost:8080

Or use the Go CLI:

sofe serve    # starts sofe-server in background
sofe evaluate # calls localhost:8080/evaluate

Endpoints

Method Path Description
GET /health Health check
POST /evaluate Evaluate AWS account against policies
POST /validate Validate a BYaML YAML file
GET /policies List all loaded policies
GET /collectors List available collectors
GET /metrics List metrics per collector
POST /connect/test Test STS AssumeRole connection

Usage

Evaluate your AWS account

curl -X POST http://localhost:8080/evaluate \
  -H "Content-Type: application/json" \
  -d '{"aws_profile": "default"}'

With cross-account role

curl -X POST http://localhost:8080/evaluate \
  -H "Content-Type: application/json" \
  -d '{
    "role_arn": "arn:aws:iam::123456789012:role/SOFEReadOnlyRole",
    "external_id": "sofe-abc123"
  }'

List policies

curl http://localhost:8080/policies

Docker

docker run -p 8080:8080 -v ~/.aws:/root/.aws:ro \
  ghcr.io/breakingthecloud/sofe-community:latest

Architecture

sofe-server (this repo)
    │
    │ imports
    ▼
sofe/ (engine — pip install sofe)
    │
    │ boto3
    ▼
Your AWS Account (read-only)

sofe-server is a thin wrapper — all logic lives in the sofe engine.

Requirements

  • Python 3.11+
  • sofe >= 0.2.0 (engine)
  • AWS credentials (profile or role)

Development

git clone https://github.com/breakingthecloud/sofe-server.git
cd sofe-server
uv venv && source .venv/bin/activate
uv pip install -e ".[dev]" -e ../sofe/
uvicorn sofe_server.app:app --reload --port 8080
Project Description
sofe Python engine (collectors + policies)
sofe-cli Go CLI (19 commands, TUI)
sofe-action GitHub Action for CI/CD
platform.sofe.dev SaaS dashboard (free tier)
sofe.dev/docs Documentation (26 pages)

License

Apache 2.0 — see LICENSE

Metadata

Release files for sofe-server 0.1.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 sofe-server 0.1.0
File Size Uploaded
sofe_server-0.1.0.tar.gz 7.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sofe-server 0.1.0
File Interpreter ABI Platform
sofe_server-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.6 kB

Release files / sofe_server-0.1.0.tar.gz

Download URL sofe_server-0.1.0.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a674823890062d1f11c63b471f77282fa5fbf39d13bcebf3a5e4f47d50e40c60
BLAKE2b-256 checksum
How to use checksums
c630ea56c208705df89dcd1049b6e2c863d576abb7f90faca3278d712e33c023
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / sofe_server-0.1.0-py3-none-any.whl

Download URL sofe_server-0.1.0-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59074b7aca0c632dee910c715dae3f887465a9d9f8add802038f73762c0fd9ed
BLAKE2b-256 checksum
How to use checksums
84737bf66240a6eee21dfa1e90a6ef8c4423c746ec441992a98f5a3f7adb7d5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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