Giter Club home page Giter Club logo

fampay-assignment's Introduction

Functionalities implemented :-

  • Fetching data from Youtube API.
  • Adding it to Database and recall api after every 600 seconds asynchronously.
  • Created a Dashboard where you can see all of the videos in paginated form.
  • Also added filter and sort-by option on right side of nav bar.

Demo:-

Project-Demo

Techstack used:-

  • Django
  • Postgresql
  • Google client library

Steps to run this project:-

  • You make sure you have Postgresql installed and working properly.
  • Clone this repo.
  • Navigate to this repo folder in terminal

Note :- You need to Add these to enviroment variables

  1. API_KEY generated from google cloud platform.
    (Don't generate Oauth2 id. Just generate the API Key for more info click here.)
  2. SECRET_KEY for Django settings.py.
  3. SQL_PASS Postgresql Password.
    ie.

Note :- I have commented out some parts of DATABASE in settings.py for deployment purposes so to run it locally setup it accordingly

  • Setup virtual enviroment
pip3 install virtualenv 
virtualenv venv
source venv/bin/activate
  • Install dependencies
pip3 install -r requirements.txt

Note :- You need to create a database in Postgresql before running the server.
Also you need to check the Database config in fampay/settings.py file to make sure database name and username matches correctly.

  • Starting the server
    • When starting it for first time, run the following command.
python3 manage.py makemigrations main
python3 manage.py migrate main
  • Now run
python3 manage.py runserver
  • Copy and paste this address in your browser
http://127.0.0.1:8000/fetch-api-from-youtube/

This route fetch-api-from-youtube is to trigger async data fetch from youtube api in interval of 10 seconds.
After Triggering, this route will redirect you to main home route where videos are listed in Paginated form along with a Sort-By Drop Down menu to specify Sort-By option and Filter-By search bar.
Here I have choosen query as football and max_results as 40.

fampay-assignment's People

Contributors

h4r5h1t-007 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.