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 4ff36c3105
QRStuff: stash some changes
1 week ago
.github/workflows QRStuff: add github actions workflow 3 weeks ago
tsg_registration QRStuff: stash some changes 1 week ago
.gitignore QRStuff: ignore .env 3 months ago
Procfile QRStuff: redo structure 7 months ago
README.md QRStuff: add a badge for black 3 weeks ago
requirements.txt QRStuff: update requirements, remove some extras 1 week ago
runtime.txt QRStuff: bump python version 2 weeks ago

README.md

QRStuff

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

SENDGRID_API_KEY - SendGrid API Key

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