Skip to content

src/dazzle_back/runtime/ops_database.py

Generated: 2026-03-30T04:38:47.684130+00:00

Commit: 615f1354a103

Language: python

Scope: dazzle_back

Purpose

Operations Database for Control Plane.

Separate database for operational data: - Health check history - Event logs (with retention) - API call tracking - Tenant-scoped analytics

This database is isolated from the application database for: 1. Security: Ops data access doesn't grant app data access ...

Key Exports

  • HealthStatus
  • ComponentType
  • HealthCheckRecord
  • ApiCallRecord
  • AnalyticsEvent
  • RetentionConfig
  • OpsCredentials
  • OpsDatabase
  • from_dict
  • create
  • verify
  • connection
  • create_credentials
  • verify_credentials
  • has_credentials
  • record_health_check
  • get_latest_health
  • get_health_history
  • record_api_call
  • get_api_call_stats

Dependencies

Imports

  • __future__.annotations
  • json
  • collections.abc.Iterator
  • contextlib.contextmanager
  • dataclasses.dataclass
  • dataclasses.field
  • datetime.UTC
  • datetime.datetime
  • datetime.timedelta
  • enum.StrEnum
  • typing.TYPE_CHECKING
  • typing.Any
  • uuid.uuid4
  • psycopg
  • dazzle_back.runtime.auth.crypto.hash_password
  • dazzle_back.runtime.auth.crypto.verify_password
  • psycopg
  • psycopg.rows.dict_row
  • dazzle_back.runtime.auth.crypto.verify_password

Event Interactions

None detected.

Invariants and Assumptions

No invariants documented.

Tests

  • tests/unit/test_ops_database_pg.py
  • tests/integration/test_runtime_e2e.py
  • tests/integration/test_runtime_pipeline.py
  • tests/unit/test_runtime_test_routes.py
  • tests/unit/test_runtime_services.py

Notes

This page was automatically generated by tools/gen_reference_docs.py.