Coder Social home page Coder Social logo

nba-hub-api's Introduction

NBA Hub API

Installation/Setup (localhost)

  • Install MongoDB server package on your computer
  • Start a mongod instance on your computer. For example, on Linux Ubuntu
    sudo systemctl start mongod // Start the mongod server
    sudo mongod // runs the server
  • To get all the dependencies required, you can either install all required dependencies on your computer or (if you're on Linux Ubuntu like I am!) start the virtual environment accompanied with this project

To install directly on your local computer

  // if you are using Python 3
  pip3 install requirements.txt
  pip3 install pymongo[srv]

  // if you are using Python 2
  pip install requirements.text
  pip install pymongo[srv]

  • Start the API
    // Assuming you are in project's root directory /NBA-Match-Predictor
    // go into api directory
    cd api
    python3 deploy.py
  • If this is your first time starting the API, your local MongoDB database is probably empty.

    • The API is configured to auto-update the database immediately after startup.
    • NOTE the first update will take roughly ~3-4 minutes since it is filling up your local mongoDB database with data from all 5 seasons from 2015-2020.
  • Test your API is running by running the main function in client.py which attempts to:

    • Simulate a game between Clippers and Lakers
    • Simulate games on Christmas Day 12/25/2019

nba-hub-api's People

Contributors

dependabot[bot] avatar treelover28 avatar

Stargazers

 avatar

Watchers

 avatar  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.