Application configuration
Encyclopedia home · Search machine-readable catalog
CF-096
Service runtime TOML
Copy to app.toml.
[server]
host = "0.0.0.0"
port = 8000
readiness_path = "/healthz"
[logging]
format = "json"Verification. Read with tomllib and validate settings at startup. Keep secrets external.
Validation syntax-validated. Official reference
CF-097
Health JSON schema
Copy to schemas/health.schema.json.
{"type":"object","properties":{"status":{"const":"ok"}},"required":["status"],"additionalProperties":false}Verification. Use jsonschema CLI with success and failure payloads.
Validation syntax-validated. Official reference
CF-098
Non-secret CI environment sample
Copy to .env.ci.example.
APP_ENV=ci
PORT=8000
LOG_LEVEL=infoVerification. Copy for disposable local Compose runs. Never use this file to store credentials.
Validation untested. Official reference
CF-099
Dependency-free Python verification package
Copy to pyproject.toml.
[project]
name = "ci-fixture"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = []
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-ra"Verification. Add pytest as a locked dev dependency for uv workflows.
Validation syntax-validated. Official reference
CF-100
Structured fixture readiness test
Copy to tests/test_health.py.
import json
import os
import unittest
from urllib.request import urlopen
class HealthContract(unittest.TestCase):
def test_ready(self):
url = os.environ.get("HEALTH_URL", "http://127.0.0.1:8000/healthz")
with urlopen(url, timeout=5) as response:
self.assertEqual({"status": "ok"}, json.load(response))Verification. Start the lab health server and run python -m unittest discover -s tests.
Validation runtime-tested. Official reference