Skip to content

pythoninthegrass/meetup_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gitleaks badge

meetup_bot

Table of Contents

Summary

Use Meetup Pro API to send Slack messages before events occur.

Minimum Requirements

Recommended Requirements

Quickstart

  • Clone repo
  • Copy .env.example to .env and fill out environment variables

Python only

cd ./app

# run individual app
python <sign_jwt|meetup_query|slackbot|main>.py

# run only main app
python main.py

Shell wrapper

cd ./app

# standalone server w/hard-coded port (default: 3000)
./startup.sh

# standalone server w/port argument
./startup.sh 3000

# server used with scheduled job (e.g., cron job)
./scheduler.sh

Devbox

I.e., Nix Package Manager

# enter dev environment
devbox shell

# run individual app
python <sign_jwt|meetup_query|slackbot|main>.py

# exit dev environment
exit

# run standalone server
devbox run start

# run tests
devbox run test

Docker

cd ./app

# build image
docker build -f Dockerfile.web --progress=plain -t meetup_bot:latest .

# run image
docker run --name meetup_bot -it --rm --env-file .env -p 3000:3000 meetup_bot bash

Docker Compose

cd ./app

# build image
docker-compose build --remove-orphans

# run image
docker-compose up -d

# enter server container
docker exec -it meetup_bot-cont bash

# exit server container
exit

# stop image
docker-compose stop

# remove image
docker-compose down --volumes

TODO

  • Refactor authentication
  • Scheduling
    • Couple scheduling with locations (e.g., Norman vs. OKC)
  • Norman events
    • Get Norman events from existing GraphQL API
      • Coded as Oklahoma City
      • Will need to modify the query to get title and body content
    • Post to #norman
      • M-F
  • Unit test
    • Add badge
    • 100% coverage
  • Documentation
    • quickstart
      • taskfile usage
      • QA (especially accounts)
    • Coralogix logging

Stretch Goals

  • Indicate online vs. in-person
  • Time Frame
    • 2 hours before
  • Slash commands to manually call:
    • Next n events
    • This week's events
    • Create new events

Contributors

Alex Ayon
Alex Ayon

💻
Add your contributions

Further Reading

API Doc Authentication | Meetup

How to Handle JWTs in Python

Building a Basic Authorization Server using Authorization Code Flow (PKCE) | by Ratros Y. | Medium

How to cancel a Heroku build | remarkablemark

OAuth2 with Password (and hashing), Bearer with JWT tokens - FastAPI

Python bcrypt - hashing passwords in Python with bcrypt

MushroomMaula/fastapi_login

FastAPI Auth + Login Page

checkbashisms

Efficient Python Docker Image from any Poetry Project

Document docker poetry best practices · python-poetry · Discussion #1879

Building Docker images in Kubernetes | Snyk

Kaniko, How to Build Container Image with SSH | by Yossi Cohn | HiredScore Engineering | Medium