Skip to content

Compile attendance data from sign-in sheets across different club events. Rebuilt from the JavaScript version.

License

Notifications You must be signed in to change notification settings

yang573/club-membership-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

club-membership-py

Compile attendance data from sign-in sheets across different club events. Rebuilt from the JavaScript version.

This app is a work in progress. You will probably need to tweak some code and configurations to get it functional. Use at your own discretion.

Getting Started

To use this application, you will need:

  • A MySQL database
  • Flask
  • mysqlclient
  • requests

The scripts for populating the database schema can be found in the scripts/ folder.

You will need to create a config.py file in the src/ folder. There, add the following variables:

database_name=[database name]
database_user=[username] # make sure you have read/write permissions
database_password=[password]

mailchimp_user=[username]
mailchimp_api_key=[api key]
mailchimp_dc=[data center] # found at the end of your api key as eg. 'us5'
mailchimp_main_audience_id=[id] # found in the under audience settings

Endpoints

Right now, this application supports the following end-points:

POST /database/event/upload/csv

Upload a csv containing sign-ins the the database. The csv must contain 'First Name', 'Last Name', "Email', & 'Newsletter' or 'Mailing List' in the headers. The body requires you to specify the file, eventName, eventDate, and semester. (In the future, this data will be obtained directly from the csv.) Specifying mailchimpto 'true' will add any subscriptions to Mailchimp. Specifyingunsubto 'true' withmailchimp` will unsubscribe users from mailchimp if indicated.

POST /database/member/

Add a member to the database. Requires the following parameters in the body: 'firstName', 'lastName', 'yearID', 'email', newsletter'

GET /database/misc/newsletter

Get the number of members subscribed to the newsletter according to the database.

Major TODO's

About

Compile attendance data from sign-in sheets across different club events. Rebuilt from the JavaScript version.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published