A simple api for sending email using Django, Django Rest Framework and Celery.
We use docker to run a redis instance
-
Clone project:
git clone https://github.com/juniorcarvalho/simple-email-celery.git
-
Create a virtualenv:
python -m venv .venv
-
Active virtualenv:
source .venv/bin/activate
-
Copy .env-sample to .env and configure your settings.
-
Install requirements:
pip install -r requirements.txt
-
Run redis container:
make docker-compose-up
ordocker-compose up -d
-
Run Celery:
make celery
orcelery -A sendemail worker -l info
-
Run project:
make dev
orpython manage.py runserver
pip install -r requirements-test.txt
make test
or pytest -s -vvv