Skip to content

Searches multiple websites and finds the cheapest car for sale

Notifications You must be signed in to change notification settings

apanesarr/CarFinds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CarFinds

Finds cars from multiple websites to ensure the lowest price. You can try out the demo here: https://apanesarr.github.io/CarFinds-FrontEnd/

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

You will need to install Django along with other libraries. Also probably a good idea to run a virtual environment.

pip install -r requirements.txt

Since the db is not provided you must run migrate to create one. Also need a user to create an auth token.

python manage.py migrate

python manage.py createsuperuser --email <SomeEmail> --username <SomeUsername>

python manage.py drf_create_token <UsernameFromBefore>

*Make sure to hold on to the auth token

Deployment

To deploy run manage.py

python manage.py runserver

Usage

Populate DB

Running populate_db command will add data to the db

python manage.py populate_db

The webscraper has not been built yet but would follow the same command

API

Currently only endpoint is /api/v1/cars which returns the whole db with cars

Example call:

http http://127.0.0.1:8000/api/v1/cars/ "Authorization: Token <GeneratedAuthToken>"

Response:

[
    {
        "img": "https://www.topgear.com/sites/default/files/styles/fit_1960x1102/public/images/news-article/carousel/2019/01/6bb7a65acd31f46e9197dcc7edd94d02/supra_edit_2.jpg?itok=dD8aNfIH",
        "name": "Supra",
        "price": 60000,
        "vendor": "Toyota"
    }
]


About

Searches multiple websites and finds the cheapest car for sale

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages