Ver detalles

Telegram Bot with Python

PythonTelegramAPIAutomation

Description

Telegram bot created with Python that automates various tasks such as reminders, information queries, and notification management. Uses the Telegram API and multiple external services.

Key Features

  • Scheduled reminders with cron jobs
  • Weather queries using external API
  • Task management with simple commands
  • Custom notifications for events
  • Activity logging for debugging

Technologies

Technology Usage
Python 3.11 Main language
python-telegram-bot Telegram API
SQLAlchemy Database
APScheduler Scheduled tasks
HTTPX HTTP requests

Project Structure

# Example bot command
@dp.message_handler(commands=['start'])
async def start(message: types.Message):
    await message.reply(
        "Hello! I'm your personal bot.\n"
        "Use /help to see available commands."
    )

Installation

# Clone the repository
git clone https://github.com/sergio/telegram-bot.git
cd telegram-bot

# Install dependencies
pip install -r requirements.txt

# Configure environment variables
cp .env.example .env

# Run
python bot.py

Learning

This project helped me deepen my knowledge in:

  • Asynchronous programming in Python
  • Working with external APIs
  • Designing conversational bots