Initial commit

This commit is contained in:
2026-09-09 16:21:13 +03:00
commit 2067d8c298
17 changed files with 1887 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
#!/usr/bin/env python3
"""Manually trigger login using the reusable iklim.co client."""
from __future__ import annotations
import logging
import sys
from pathlib import Path
from typing import Any
import requests
from common import ApiError, ConfigurationError, IklimClient, configure_logging
BASE_DIR = Path(__file__).resolve().parent
def login() -> dict[str, Any]:
client = IklimClient.from_env(BASE_DIR / ".env")
return client.auth.login()
def main() -> int:
configure_logging(BASE_DIR / "logs" / "iklim-api-debug.log")
try:
login()
except (ConfigurationError, ApiError, requests.RequestException) as exc:
logging.error("Login başarısız: %s", exc)
return 1
return 0
if __name__ == "__main__":
sys.exit(main())