This project is designed to serve as a MVP for Adease. Built with Python, Flask, Celery, Redis & MongoDB
Below are the steps required to run this app
Create a virtual env and activate it
python3 -m venv /path-to-project/venv
source ./venv/bin/activate
Install requirements
pip install -r requirements.txt
Run flask app (in debug mode)
python run.py
Run celery task queue (in debug mode)
celery worker -A app.celery --loglevel=debug
Setup mongoDb, redis and update urls in constants.py
Key -
data: {
destination_url: String,
headline: String(30),
primary_text: String(120),
name: String,
type: 'IMAGE_AD' or 'VIDEO_AD'
}
Minified Sample Value -
data
-
[{"destination_url":"https://imgur.com/gallery/YZ1yC5a","headline":"Imgur Ad","name":"Ad no 02","primary_text":"Some random image meme","type":"IMAGE_AD"},{"destination_url":"https://www.youtube.com/watch?v=8sjm7eeat-4","headline":"Calculated or Random Ad","name":"Ad no 52","primary_text":"Dota Channel","type":"VIDEO_AD"},{"destination_url":"https://www.youtube.com/watch?v=3Efm5rdzJ-E","headline":"Calculated or Random Ad","name":"Ad no 58","type":"VIDEO_AD"},{"destination_url":"https://www.youtube.com/watch?v=vRhhS6BnLSY","headline":"Calculated or Random Ad","name":"Ad no 55","type":"VIDEO_AD"},{"destination_url":"https://www.youtube.com/watch?v=zUb0pAN_uNE","headline":"Calculated or Random Ad","name":"Ad no 54","type":"VIDEO_AD"}]
Key -
name: String,
replace: {
destination_url: String,
headline: String(30),
primary_text: String(120),
name: String,
type: 'IMAGE_AD' or 'VIDEO_AD'
}
Minified Sample Value -
name
- Ad no 24
replace
-
{"content_url":"https://imgur.com/gallery/4nv4xRN","created_at":"2022-02-09 15:15:33.040172","destination_url":"https://imgur.com/gallery/4nv4xRN","headline":"xqnajxfpcxcdfkozuhnj Ad","meta_data":"","name":"Ad no 91","primary_text":"vcpmjkdkdhtunannkcrogucllkbcnjpxbufqvozqyojffjamlbyzjgndcwgkmynuonamsjvpucgjkmoqkfplpyqsvvsaqxvvkdqc","type":"IMAGE_AD","updated_at":"2022-02-09 15:15:33.040174"}
Key -
size: Integer
Minified Sample Value -
size
- 30
MIT License
Copyright (c) 2022 Raajesh