FastAPI + Celery + Next.js + Postgres/Redis app with company monitoring, source collection, LLM-based change analysis, enrichment, and account security (Turnstile, escalating lockout, email verification).
14 lines
302 B
Python
14 lines
302 B
Python
"""Small text utilities with no natural home elsewhere."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import re
|
|
|
|
_SLUG_STRIP_RE = re.compile(r"[^a-z0-9]+")
|
|
|
|
|
|
def slugify(value: str) -> str:
|
|
value = value.strip().lower()
|
|
value = _SLUG_STRIP_RE.sub("-", value).strip("-")
|
|
return value or "company"
|