xbgmsharp / postgsail-telegram-bot

PostgSail Telegram bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PostgSail Telegram bot.

Basic telegram bot to interact with PostgSail and mostly to register user for telegram notification.

Telegram allow private and group notification.

πŸš€ Getting Started

Cloud development

A full-featured development environment.

With CodeSandbox

With DevPod

Running on Local Machine

  • install dependencies using Poetry

    poetry install
    
  • configure environment variables in .env file

  • start bot in virtual environment

    poetry run python -m bot
    

Launch in Docker

  • configure environment variables in .env file

  • start virtual environment

    poetry shell
    
  • building the docker image

    docker-compose build
    
  • start service

    docker-compose up -d
    

🌍 Environment variables

variables description
BOT_TOKEN Telegram bot API token
PGSAIL_URL PostgSail API url

I use Redis for Finite State Machine, and PostgreSQL as Database

πŸ”§ Tech Stack

  • aiogram β€” asynchronous framework for Telegram Bot API
  • aiohttp - Asynchronous HTTP Client/Server for asyncio and Python.
  • asyncpg β€” asynchronous PostgreSQL database client library
  • poetry β€” development workflow
  • loguru β€” third party library for logging in Python
  • docker β€” to automate deployment
  • postgres β€” powerful, open source object-relational database system
  • redis β€” an in-memory data structure store

πŸ‘·πŸΎ Contributing

First off, thanks for taking the time to contribute! Contributions are what makes the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork this repository
  2. Create a branch
  3. Commit your changes
  4. Push your commits to the branch
  5. Submit a pull request

πŸ“ License

Distributed under the GPL-3.0 license. See LICENSE for more information.

πŸ“’ Contact

donbarbos: donbarbos@proton.me

About

PostgSail Telegram bot

License:GNU General Public License v3.0


Languages

Language:Python 92.0%Language:Dockerfile 8.0%