Jun 26 MT-1 phase

This commit is contained in:
2026-06-26 16:37:44 -04:00
parent fc39491891
commit 07cf2e5816
9 changed files with 300 additions and 55 deletions
+18
View File
@@ -0,0 +1,18 @@
"""
app/tenancy/
============
Host-based tenant resolution and per-tenant database routing (MT-1).
Public surface:
RoutingSession — tenant-aware session class (installed on `db`)
init_tenancy — registers the before_request resolver hook
TenantContext — detached descriptor carried on g.tenant
Inert unless config MULTI_TENANT_ENABLED is True.
"""
from app.tenancy.routing import RoutingSession
from app.tenancy.middleware import init_tenancy
from app.tenancy.context import TenantContext
__all__ = ['RoutingSession', 'init_tenancy', 'TenantContext']