Coverage for fastblocks/adapters/sitemap/_base.py: 0%
22 statements
« prev ^ index » next coverage.py v7.10.6, created at 2025-09-21 04:50 -0700
« prev ^ index » next coverage.py v7.10.6, created at 2025-09-21 04:50 -0700
1import typing as t
2from dataclasses import dataclass
3from datetime import datetime
5from acb.config import AdapterBase, Settings
8@dataclass
9class SitemapURL:
10 loc: str
11 lastmod: datetime | None = None
12 changefreq: (
13 t.Literal["always", "hourly", "daily", "weekly", "monthly", "yearly", "never"]
14 | None
15 ) = None
16 priority: float | None = None
19class SitemapBaseSettings(Settings):
20 module: str = "native"
21 domain: str = ""
22 change_freq: t.Literal[
23 "always",
24 "hourly",
25 "daily",
26 "weekly",
27 "monthly",
28 "yearly",
29 "never",
30 ] = "weekly"
31 cache_ttl: int = 3600
33 strategy_options: dict[str, t.Any] = {
34 "include_patterns": [],
35 "exclude_patterns": ["^/admin/.*", "^/api/.*", ".*/__.*"],
36 "static_urls": [],
37 "model_configs": [],
38 "background_refresh": True,
39 "cache_warmup": False,
40 }
43class SitemapProtocol(t.Protocol):
44 sitemap: t.Any = None
47class SitemapBase(AdapterBase):
48 category = "sitemap"
49 settings_klass = SitemapBaseSettings
50 sitemap: t.Any = None