QuvonchbekBobojonov / aiogram-webhook-template

Aiogram version 3 web hook template via FastAPI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

aiogram-webhook-template

This template provides a basic setup for using Aiogram version 3 with webhooks via FastAPI.

Features

  • Aiogram version 3
  • FastAPI integration for webhooks
  • Asynchronous handling of incoming updates
  • Basic example commands and handlers

Requirements

  • Python 3.11 and higher
  • Aiogram library
  • FastAPI library

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/aiogram-webhook-template.git
  2. Change into the project directory:

    cd aiogram-webhook-template
  3. Install the required dependencies:

    pip install -r requirements.txt

Configuration

  1. Rename the .env.example file to .env:

    cp .env.example .env
  2. Open the .env file and provide your Bot API token and other necessary configurations.

Usage

  1. Start bot
python ./main.py

Now, your Aiogram bot is configured to use webhooks via FastAPI. You can extend the provided example commands and handlers for your specific use case.

Contributing

Feel free to contribute to the project by opening issues or creating pull requests. Your feedback and collaboration are highly appreciated!

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Aiogram version 3 web hook template via FastAPI

License:MIT License


Languages

Language:Python 100.0%