infrasynth-backend-kit/infrasynth/shared/__init__.py
jcv-dev 5df0be1f5c feat: uniform extensibility across every module
Close the remaining places where an extension point was hardcoded, and
expose a stable public import surface for every app.

- files: register_storage_backend(...) / STORAGE_BACKENDS[name]["CLASS"];
  unknown backends now fail loudly instead of silently using local
- files: PipelineStepRegistry + @pipeline_step; PIPELINE_EXECUTOR setting
- billing: INVOICE_PDF_BUILDER setting
- security: TWO_FACTOR_SERVICE / TWO_FACTOR_RECOVERY_SERVICE settings
- all app packages expose lazy public exports (PEP 562); infrasynth.shared
  re-exports its primitives eagerly
- README documents the per-module extension-point table
- tests/test_extensibility.py pins each hook plus the public surface
2026-09-24 11:08:08 -05:00

62 lines
1.3 KiB
Python

"""Public surface of ``infrasynth.shared`` (zero-Django primitives).
Safe to import eagerly — nothing here imports Django models or app state.
"""
from .crypto import decrypt, encrypt, generate_key, get_fernet, rotate_keys
from .enums import (
ApprovalStrategy,
AuditAction,
BillingInterval,
ChannelType,
EntitlementStatus,
EventSeverity,
InvoiceStatus,
MonetizationModel,
PlanInterval,
SubscriptionStatus,
)
from .exceptions import (
AppError,
AuthError,
ConflictError,
EntitlementError,
NotFoundError,
RateLimitError,
ServerError,
ValidationAppError,
)
from .protocols import AuditableProtocol, EventProtocol, TenantProtocol
from .results import Result
from .settings_utils import get_setting
__all__ = [
"AppError",
"ApprovalStrategy",
"AuditAction",
"AuditableProtocol",
"AuthError",
"BillingInterval",
"ChannelType",
"ConflictError",
"EntitlementError",
"EntitlementStatus",
"EventProtocol",
"EventSeverity",
"InvoiceStatus",
"MonetizationModel",
"NotFoundError",
"PlanInterval",
"RateLimitError",
"Result",
"ServerError",
"SubscriptionStatus",
"TenantProtocol",
"ValidationAppError",
"decrypt",
"encrypt",
"generate_key",
"get_fernet",
"get_setting",
"rotate_keys",
]