All notable changes to apiforgepy are documented here.
Format: Keep a Changelog — versioning follows Semantic Versioning.
- Cloud mode now sends the
X-APIForge-Keyheader instead ofX-API-Key, matching the saas-api rename (CDC §8.4.1). Cloud ingest against the current APIForge API requires this version — 3.x and earlier send the old header and are rejected with401. The header is internal to the SDK, so no code change is needed on your side beyond upgrading.
- The local dashboard now serves its React/Babel runtime from files vendored inside the package instead of downloading them from a CDN (jsDelivr) on first launch. The dashboard works fully offline and makes no third-party requests — privacy-first parity with the Node and PHP SDKs. Bundled versions: react 18.3.1, react-dom 18.3.1, @babel/standalone 7.29.7.
pip install "apiforgepy>=4.0.0"No configuration change is required — the header is set internally by CloudTransport. Upgrade any service running the SDK in cloud mode.
flush_intervalparameter removed fromApiForgeMiddleware— passing it now raisesTypeError. The flush window is fixed at 60 seconds.envno longer falls back toos.environ.get("ENV")— must be passed explicitly. Default is now'production'.releaseno longer falls back toos.environ.get("APP_VERSION")— must be passed explicitly. Default is nowNone.
bytes_avgfield: average response body size (bytes) per route per bucket, sourced from theContent-Lengthresponse headerinflight_avgandinflight_maxper route — inflight concurrency count captured via ASGI scope and aggregated per minute bucket
# Before (v2.x)
app.add_middleware(
ApiForgeMiddleware,
flush_interval=30_000, # ← remove (TypeError in v3)
env=os.environ.get("ENV", "production"), # ← pass explicitly
release=os.environ.get("APP_VERSION"), # ← still OK (your app reads the env var)
)
# After (v3.0)
app.add_middleware(
ApiForgeMiddleware,
env="production", # set explicitly
release="v1.4.0", # set explicitly
)DRIFTinsight type: detects progressive latency degradation using ordinary least squares over the last 30 days — emitted when slope ≥ 5ms/day over 7+ data points, with a 30-day projectionDRIFTfilter chip added to the dashboard Insights view- 60 unit tests covering
aggregator,database,insightsandmiddleware
- CI badge was pointing to
mainwith no workflow run — CI now triggers on bothmainanddev
1.0.0 — 2026-05-15
/api/summarynow returns a flat response structure (calls_24h,error_rate_24h,avg_p90_24h,active_routes) matching the React dashboard frontend — fixes "0 requests" display
/api/global-timeseriesendpoint consumed by the dashboard overview chart/api/releasesendpoint (returns[]for now — release tracking planned)
- Dashboard UI now loads React and Babel from jsDelivr CDN instead of local assets, making
ui.htmlSDK-agnostic
0.1.0 — 2026-05-15
- Starlette/FastAPI middleware
ApiForgeMiddleware— drop-in observability with zero mandatory configuration - Local-first mode with SQLite storage via Python's built-in
sqlite3module (requires Python ≥ 3.11) - Per-endpoint metrics: P50 / P90 / P99 latency, request count, 2xx / 4xx / 5xx breakdown
- In-memory aggregation with configurable flush interval (default: 60s), thread-safe
- Circuit breaker on the transport layer — middleware never crashes the host application
- Built-in dashboard on port 4242 with dark theme, Chart.js time series, routes table and insights panel
- REST API:
/api/summary,/api/routes,/api/timeseries,/api/insights - Three automatic insight types:
ANOMALY(Z-score P99),DEAD(endpoint inactive 21+ days),PERF/OK(regression or improvement after a release) - API Health Score (0–100) combining availability, performance, stability and quality
- Configurable sampling rate, ignored paths, environment label, release tag and service name
middleware.shutdown()for graceful teardown (flushes buffer, closes SQLite)