code-moniker-workspace 0.4.0

Workspace model, ports, snapshots, linkage, and change analysis for code-moniker.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from analytics_service.models import Customer, RiskScore
from analytics_service.policies import RiskPolicy


class AnalyticsService:
    def __init__(self, policy: RiskPolicy) -> None:
        self._policy = policy

    def score(self, customer: Customer, features: dict[str, int]) -> RiskScore:
        return self._policy.evaluate(customer, features)


def build_default_service() -> AnalyticsService:
    return AnalyticsService(RiskPolicy())