Skip to content

Latest commit

 

History

History
77 lines (51 loc) · 1.26 KB

README.md

File metadata and controls

77 lines (51 loc) · 1.26 KB

flask-send-mail

Web app for sending mail based on timestamp given build with flask

Development

  • Create and activate new Python virtual environment
python3 -m venv env
source env/bin/activate
  • Install dependencies
pip install -r requirements.txt
  • Set env variables for local machine
export FLASK_APP=flask_send_mail
export FLASK_ENV=development
  • Initialize database
flask init-db
  • Run app
flask run
  • Testing
# make sure you install the application first
pip install -e .

# if db not found
flask init-db

# run tests
pytest

Using Scheduler

  • install rabbitMQ on your local machine

for detail step of installation, you can go to this link

  • create your mailtrap account

sign up or create through this link

  • set env for mailtrap user and pass
export MAIL_USERNAME='your-mailtrap-username'
export MAIL_PASSWORD='your-mailtrap-password'
  • run celery command
celery -A flask_send_mail.tasks.celery worker -l info -B

API SPEC

please go to this link to see the api spec for available endpoints.