feat: Implement core application structure, AI extraction, persistence, and Telegram bot modules with updated configuration and dependencies.

This commit is contained in:
Marco Gallegos
2025-12-18 12:15:04 -06:00
parent 7276e480b0
commit 899482580e
45 changed files with 1157 additions and 225 deletions

View File

@@ -0,0 +1,21 @@
"""
Client for sending data to external webhook URLs.
"""
import httpx
import logging
logger = logging.getLogger(__name__)
async def send_to_webhook(url: str, data: dict):
"""
Sends a POST request with JSON data to a specified webhook URL.
"""
try:
async with httpx.AsyncClient() as client:
response = await client.post(url, json=data)
response.raise_for_status()
logger.info(f"Successfully sent data to webhook {url}")
return True
except httpx.RequestError as e:
logger.error(f"Failed to send data to webhook {url}: {e}")
return False