Xpersona
F

Fastapi Studio Template

CLAWHUB · Unverified

Bootstrap a dark-themed FastAPI+HTMX studio app with SSE real-time progress, blind test mode, SQLite ratings, and Langfuse tracing. Based on the image-gen-st... Skill: Fastapi Studio Template Owner: nissan Summary: Bootstrap a dark-themed FastAPI+HTMX studio app with SSE real-time progress, blind test mode, SQLite ratings, and Langfuse tracing. Based on the image-gen-st... Tags: latest:1.2.2 Version history: v1.2.2 | 2026-03-28T04:40:46.485Z | user Add security_notes: outbound is Langfuse-only (self-hosted or personal cloud account) v1.2.1 | 2026-03-15T22:26:16.895Z | auto V

62
Rank
84
Safety
1.2k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.2K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17f2fw07zktjmcgagf5c29tbd83rt7v:fastapi-studio-template
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-nissan-fastapi-studio-template/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

52,420 characters of source documentation, loaded on request.

Extracted files

3 files captured from the source.

SKILL.md

---
name: fastapi-studio-template
version: 1.2.2
description: Bootstrap a dark-themed FastAPI+HTMX studio app with SSE real-time progress, blind test mode, SQLite ratings, and Langfuse tracing. Based on the image-gen-studio architecture.
homepage: https://github.com/reddinft/skill-fastapi-studio-template
metadata:
  {
    "openclaw": {
      "emoji": "🎨",
      "requires": {
        "bins": ["python3"],
        "env": ["LANGFUSE_PUBLIC_KEY", "LANGFUSE_SECRET_KEY"]
      },
      "primaryEnv": "LANGFUSE_PUBLIC_KEY",
      "network": {
        "outbound": true,
        "reason": "Sends traces to Langfuse (self-hosted or cloud) for LLM observability. No other external calls."
      },
      "security_notes": "Outbound calls go only to the user's own Langfuse instance (self-hosted or their personal Langfuse cloud account). No data is sent to third parties. The template itself generates no network traffic — traces are only sent if the user configures and runs the Langfuse integration."
    }
  }
---
**Last used:** 2026-03-24
**Memory references:** 2
**Status:** Active


# FastAPI Studio Template

Bootstrap a dark-themed FastAPI + HTMX studio app for generative AI comparison, A/B testing, and human evaluation with real-time progress streaming.

## When to Use

- Any "studio" app: image generation comparison, text model A/B testing, human evaluation UI
- Apps needing real-time progress updates (generation can take 30s–15min)
- Blind test / evaluation interfaces where raters shouldn't know which model produced which output
- Rapid prototyping of gen AI comparison tools

## When NOT to Use

- Simple CRUD apps (use standard FastAPI + Jinja2)
- Apps that don't need real-time progress (SSE adds complexity)
- Production-scale apps with 100+ concurrent users (use WebSockets instead of SSE)

## Core Patterns

### SSE Async Pattern (Critical)

**MUST use `threading.SimpleQueue` + asyncio polling.** Do NOT use `run_in_executor` with blocking reads — it deadlocks the event loop.

```python
import asyncio
import threading
from queue import SimpleQueue

from fastapi import FastAPI
from fastapi.responses import StreamingResponse

app = FastAPI()

async def event_stream(queue: SimpleQueue):
    """Yield SSE events from a thread-safe queue."""
    while True:
        try:
            msg = queue.get_nowait()
        except Exception:
            await asyncio.sleep(0.1)
            continue
        if msg is None:  # sentinel
            yield f"data: {{\"done\": true}}\n\n"
            break
        yield f"data: {msg}\n\n"

@app.get("/generate/stream")
async def generate_stream(prompt: str, model: str):
    queue = SimpleQueue()

    def _run():
        # Heavy generation work in background thread
        for step in range(10):
            import time; time.sleep(1)
            queue.put(f'{{"step": {step}, "total": 10}}')
        queue.put(None)  # done sentinel

    threading.Thread(target=_run, daemon=True).start()
    return StreamingResponse(event_stream(queue)

_meta.json

{
  "ownerId": "kn72rbtybr3jzhcj2260qz6p2181x1mr",
  "slug": "fastapi-studio-template",
  "version": "1.2.2",
  "publishedAt": 1774672846485
}

skill-card.md

## Description:

Bootstrap a dark-themed FastAPI+HTMX studio app with SSE real-time progress, blind test mode, SQLite ratings, and Langfuse tracing.

This skill is ready for commercial/non-commercial use.

## Publisher:

[nissan](https://clawhub.ai/user/nissan)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and engineers use this skill to bootstrap FastAPI and HTMX studio applications for generative AI comparison, A/B testing, human evaluation, real-time progress streaming, ratings storage, and optional Langfuse tracing.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Generated apps may load HTMX and the SSE extension from third-party browser CDNs.

Mitigation: Vendor browser dependencies locally or add SRI and a restrictive Content Security Policy before deployment.

Risk: Example routes pass prompts in URLs, which can expose prompt content through logs, browser history, or intermediary systems.

Mitigation: Use request bodies for sensitive prompts and avoid storing full prompt text in access logs.

Risk: Langfuse tracing can capture sensitive prompt or output data when enabled.

Mitigation: Make tracing explicit, redact sensitive fields, and set retention limits appropriate for the deployment.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/nissan/skills/fastapi-studio-template)
- [Declared project homepage](https://github.com/reddinft/skill-fastapi-studio-template)
- [HTMX 1.9.12 CDN script](https://unpkg.com/htmx.org@1.9.12)
- [HTMX SSE extension CDN script](https://unpkg.com/htmx.org@1.9.12/dist/ext/sse.js)

## Skill Output:

**Output Type(s):** [Guidance, Markdown, Code, Shell commands, Configuration]

**Output Format:** [Markdown guidance with Python, SQL, HTML, JavaScript, and shell command examples]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Requires python3; optional Langfuse tracing uses LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY when configured.]

## Skill Version(s):

1.2.2 (source: frontmatter and server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to Fastapi Studio Template and adjacent AI workflows.