forze-wiring
Forze Wiring
Use when setting up the Forze runtime, dependency plan, lifecycle, usecase composition, and interface layer. For logical spec names, routes, and StrEnum wiring, see forze-specs-infrastructure. For custom dependency modules, see forze-deps-modules. For HTTP details, see forze-fastapi-interface. For day-to-day usecase code, see forze-framework-usage.
Runtime setup
Kernel specs (DocumentSpec, SearchSpec, CacheSpec, …) declare model types and logical name only—no DSNs, table names, collection paths, or index DDL. Deps modules (PostgresDepsModule, MongoDepsModule, RedisDepsModule, …) map that same name to physical configs (read/write relations, Redis namespaces, PostgresSearchConfig, …). DepsPlan.from_modules(...) merges those modules so ExecutionContext resolves factories by route spec.name (for example DocumentQueryDepKey / DocumentCommandDepKey). See pages/docs/concepts/specs-and-wiring.md.
Dependency plan
Pass DepsModule instances to DepsPlan.from_modules. Each module’s __call__ returns a Deps container; the plan merges them (conflicting keys raise CoreError).
from enum import StrEnum
from forze.application.execution import DepsPlan, ExecutionRuntime, LifecyclePlan
from forze_postgres import PostgresDepsModule, postgres_lifecycle_step, PostgresClient, PostgresConfig
from forze_redis import RedisDepsModule, redis_lifecycle_step, RedisClient, RedisConfig