Files
ja4-platform/shared/python/ja4_common/ja4_common/settings.py
toto 3dfeba860b docs: add standardized comments to all services (Python, Go, Bash)
- Add docs/commenting-standard.md defining per-language comment standards
  (Go godoc, Python PEP-257, C Doxygen, Bash header blocks, SQL banners)

- services/dashboard: 100% docstring coverage (100/100 functions)
  - All FastAPI route handlers, helpers, classes, and models documented
  - Language: French (project convention)

- services/bot-detector: 100% docstring coverage (53/53 symbols)
  - bot_detector.py: 14 functions + module docstring
  - anubis/fetch_rules.py: 9 functions

- shared/python/ja4_common: full docstrings on ClickHouseClient (7 methods)
  and ClickHouseSettings class

- services/correlator: 24 godoc comments added across 6 Go files
  - correlation_service.go: 10 private helpers
  - unixsocket/source.go: 6 parsing/socket helpers
  - correlated_log.go: 4 field extraction helpers
  - orchestrator.go, logger.go, main.go: 4 comments

- services/correlator/scripts/audit-architecture.sh: standardized header block

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-07 21:32:29 +02:00

30 lines
1.2 KiB
Python

"""Paramètres de connexion ClickHouse centralisés, chargés depuis les variables d'environnement."""
from pydantic_settings import BaseSettings
class ClickHouseSettings(BaseSettings):
"""Paramètres de connexion ClickHouse lus depuis l'environnement ou un fichier .env.
Attributs :
CLICKHOUSE_HOST : hôte du serveur ClickHouse.
CLICKHOUSE_PORT : port HTTP de l'API ClickHouse (défaut 8123).
CLICKHOUSE_DB : base de données de connexion par défaut.
CLICKHOUSE_DB_LOGS : base de données des logs bruts.
CLICKHOUSE_DB_PROCESSING : base de données de traitement analytique.
CLICKHOUSE_USER : nom d'utilisateur.
CLICKHOUSE_PASSWORD : mot de passe (chaîne vide si aucun).
"""
CLICKHOUSE_HOST: str = "clickhouse"
CLICKHOUSE_PORT: int = 8123
CLICKHOUSE_DB: str = "ja4_processing" # default connection database
CLICKHOUSE_DB_LOGS: str = "ja4_logs"
CLICKHOUSE_DB_PROCESSING: str = "ja4_processing"
CLICKHOUSE_USER: str = "admin"
CLICKHOUSE_PASSWORD: str = ""
model_config = {"env_file": ".env", "case_sensitive": True}
# Singleton instance — re-instantiate in tests via ClickHouseSettings() directly
settings = ClickHouseSettings()