INNER CODE UNIT · Python
shutdown
buzzsubash/algo_trading_strategies_india · broker-utilities/zerodha-kite-connect-auto-login.py:122
def shutdown(self):
"""Shutdown the Flask server"""
logging.info('Shutting down server')
self.server.shutdown()
class TelegramNotifier:
"""Class to handle Telegram notifications"""
def __init__(self, token):
self.token = token
self.base_url = f"https://api.telegram.org/bot{token}/sendMessage"
def send_message(self, text, chat_id):
"""Send message to Telegram chat"""
try:
payload = {
'chat_id': chat_id,