Skip to content

Telegram Bot for dealing with Google Sheets in Python using sqlite3, python-telegram-bot and gspread library

Notifications You must be signed in to change notification settings

Neliz3/counter_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Counter-hack Bot

Telegram Bot for dealing with Google Sheets in Python using sqlite3, python-telegram-bot and gspread library

Counter-hack helps to count money (or something else in future) getting numbers and categories from a user.

  • Sqlite3 database is used for data storage.

  • The bot, receiving a request from the user, processes it using the python-telegram-bot library, which interacts with the Telegram bot API.

  • gspread is a Python API for Google Sheets.

Table of contents

How to use it

  1. Open Google Sheets template
  2. Click 'Share access' for editing with telegram-bot-service@counter-bot-361806.iam.gserviceaccount.com
  3. Copy URL of a page and send it to Counter-hack bot

Setup

  • All packages are located in requirements.txt
  • Environmental variables are located in .env (you must change example.env file)

Technologies Used

  • Python 3.8
  • sqlite3
  • python-telegram-bot
  • gspread

Installation

python3 -m venv env

. env/bin/activate

pip install -r requirements.txt

Step by step installation

Install python-telegram-bot library

pip install python-telegram-bot --upgrade

Then install ...

pip install telegram

Then library for getting environmental variables:

pip install python-dotenv

Install a gspread library (a Python API for Google Sheets)

pip install gspread

Project status

Project is in progress

Room for improvement

Future features

  • Adding new languages
  • Adding feature for an admin to get more statistic information
  • Bot will create its own table with all values, user need only click start, pass authentication and choose a template

Future changing

  • Replace polling with webhook
  • Check if the name of a sheet is equal to a month and create a new one if not

About

Telegram Bot for dealing with Google Sheets in Python using sqlite3, python-telegram-bot and gspread library

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published