Skip to content

helper

django_spire.helper

Spire

Metric

Statistic
record staticmethod
Source code in django_spire/helper.py
@staticmethod
def record(
        statistic_key: str,
        sub_domain_key: str,
        reference: str,
        value: float | str | Decimal = 1,
) -> None:
    from django_spire.metric.domain.statistic.models import Statistic
    Statistic.services.record(statistic_key, sub_domain_key, reference, value)
remote_record staticmethod
Source code in django_spire/helper.py
@staticmethod
def remote_record(
        statistic_key: str,
        sub_domain_key: str,
        reference: str,
        value: float | str | Decimal = 1,
) -> dict | None:
    from django_spire.metric.domain.statistic.models import Statistic
    Statistic.services.remote_record(statistic_key, sub_domain_key, reference, value)