tumblr-stats/build_total_stats_model.py

20 lines
697 B
Python

from dataclasses import dataclass, field
from typing import Dict, List
from stats_model import StatsModel
@dataclass(kw_only=True)
class BuildTotalStatsModel(StatsModel):
"""Stats model built around calculating stats for posts containing one one or more specified tags."""
operation: str = 'build_total_stats'
# Top 100 posts, ranked from most popular to least popular by notes.
top_100_ranked_post_urls: List[str] = field(default_factory=list)
# Posts ranked from most popular to least popular by notes within each month and year.
top_post_urls_by_month_and_year: Dict[str, List[str]] = field(init=False)
def __post_init__(self):
super().__post_init__()