You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Akhil Narang 92b2ee9cdc
QRStuff: drop python-telegram-bot
1 month ago
.github/workflows QRStuff: add github actions workflow 2 months ago
tsg_registration QRStuff: drop python-telegram-bot 1 month ago
.gitignore QRStuff: ignore .env 5 months ago
Procfile QRStuff: redo structure 9 months ago QRStuff: add a badge for black 2 months ago
bitgrit.png Loooookkksssss 1 month ago
requirements.txt QRStuff: drop python-telegram-bot 1 month ago
runtime.txt QRStuff: run with python 3.8.0 2 months ago


This application requires atleast python3.6 to run.

To install all requirements, please run

pip install -r requirements.txt

A few environment variables should be set for proper functionality

BOT_API_KEY - Telegram Bot API Key

GROUP_ID - Telegram Group ID


FROM_EMAIL - Email address SendGrid should use as sender

DATABASE_URL - URL to database including credentials - set by default in heroku

USERNAME - Username to access the /users endpoint

PASSWORD - Password to access the /users endpoint

To test locally if everything is deployed on heroku

heroku config -a thescriptgroup --shell > .env
heroku local

heroku local loads a .env file by default. If you do not have access to the project (as external contributors wouldn’t), you can simply manually fill in the values in a simple key=value format.

To export everything in .env to your environment, you can simply run

for f in $(awk -F'=' '{print $1}' .env); do export $f; done

There are various ways to run the application

  • With gunicorn
gunicorn tsg_registration:app
  • Directly running the module
python3 -m tsg_registration