Skip to content

This project contains a telegram bot interface to easily manage the birthdays of your family, friends and acquaintances.

License

Notifications You must be signed in to change notification settings

melax08/birthdaygram

Repository files navigation

birthdaygram workflow Code style: black

Birthdaygram - telegram bot for birthday reminders

birthdaygram_logo.png

Information

Description

This project contains an asynchronous telegram bot interface to easily manage the birthdays of your family, friends and acquaintances.

Features

  • All telegram users who use the bot has their own database table and can manage only their own list by the telegram bot interface.
  • Easy add or remove persons to your personal list.
  • View your entire personal list of people.
  • Ability to see who has a birthday today, within a week or within a month.
  • A scheduler that will run at the specified time then the bot starts checking all users for the presence of people whose birthday is today and exactly 7 days later, after which it sends a message with a reminder of this.
  • Fully asynchronous.

bot_example.png

Author

Ilya Malashenko (github: melax08)

System requirements

  • Python 3.11;
  • Docker (19.03.0+) with docker compose for easy run.

Tech stack

Python Poetry Python-telegram-bot Postgres SQLAlchemy

Installation and start

Via docker

Clone the repo and change directory to it:

git clone https://github.com/melax08/birthdaygram.git
cd birthdaygram

Copy file .env.example to .env and fill it in

cp .env.example .env
nano .env

Run docker compose to create needed containers:

docker compose up -d
Without docker

There is no information yet.

Settings and documentation

All bot constants you can find in src/bot/constants/constants.py. Some of them you can set in .env file (see example in .env.example file).

Scheduler settings

At the specified time, the scheduler runs a task to check all tables in the database for records of people whose birthday is today or exactly 7 days from now. Those who have these people added to the database will receive a telegram message with information about birthdays.

You can set a RUN_SCHEDULER_HOURS constant in the file .env. Example:

RUN_SCHEDULER_HOURS=12 18

The scheduler tasks will be added to the queue when the bot starts. In this example, the scheduler will run at 12:00 (12:00 AM) and 18:00 (6:00 PM)

If you set RUN_SCHEDULER_HOURS to the empty value (RUN_SCHEDULER_HOURS=), the scheduler will not work.

For developers

Use pre-commit to automatic application of black, isort, flake8 and other pre-commit hooks.

pre-commit install

About

This project contains a telegram bot interface to easily manage the birthdays of your family, friends and acquaintances.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published