- Clone the project
git clone https://github.com/IamRash-7/fampay-assignment.git
- Activate Virtual Environment
cd fampay-assignment
pip3 install virtualenv
virtualenv my_env
source my_env/bin/activate
- Create .env file (All these variables are required)
API_KEYS_STRING=KEY1,KEY2
MONGO_URI=mongodb://{HOST}:{PORT}/
REDIS_URI=redis://{HOST}:{PORT}/0
DATABASE_NAME=DATABASE_NAME
COLLECTION_NAME=COLLECTION_NAME
- Install Requirements
pip3 install -r requirements.txt
docker-compose build
docker-compose up
docker-compose down
NOTE: Change .env file accordingly
python3 app.py
redis-server --port 6379
celery -A src.tasks worker --loglevel=info
- Workercelery -A src.tasks beat --loglevel=info
- Scheduler
NOTE: My Youtube query = football
- Method = GET
- Endpoint = /hello
- Example = http://127.0.0.1:8002/hello
-
Method = GET
-
Endpoint = /videos
-
Params
- page - Required Page Number
- per_page - No. items per page
-
Method = GET
-
Endpoint = /search
-
Params
- query - Search text
-
Example = http://127.0.0.1:8002/search?query=messi
- Python
- Flask
- MongoDB
- Celery
- Redis
- PyMongo
- Docker