Giter VIP home page Giter VIP logo

dataengineering-codingchallenge's Introduction

JCompany ๐Ÿ›Ž๏ธ

OLTP API for the insertion and analysis of company employees, departments, and jobs

Build With โš™๏ธ

Python Flask MySql Docker Azure

Getting Started โœ…

Prerequisites โฌ…๏ธ

  • Install Python
  • Install Docker Desktop
  • Clone repository

Installation ๐Ÿ”ƒ

  1. Open the terminal and go inside the project folder.
cd /../../project_folder
  1. Run the following command to run the containers 3 containers:
  • Flask API (port 5000)
  • MySQL (port 3306)
  • phpMyAdmin (port 80)
docker compose up
  1. Start using the API ๐Ÿค—.
http://localhost:5000
  1. (Optional) You can try the version hosted on Azure ๐Ÿซก.
http://52.226.230.142:5000 # API
# or
http://52.226.230.142 # phpMyAdmin

Tests โ–ถ๏ธ

If you have the containers up and running, follow the next steps to execute the test cases:

  1. Go inside the "jcompany" folder
cd jcompany
  1. Create the virtual environment (venv) and install all the dependencies.
python -m venv venv
# Run "activate" script inside the "venv/Scripts" folder
pip install --upgrade pip
pip install -r requirements.txt
  1. Run the tests
py manage.py test

Endpoints ๐Ÿ“ก

Departments ๐Ÿข

URL Method Input Output
.../departments GET - List of departments
.../departments POST List of departments -
.../departments/csv POST csv of departments -

Jobs ๐Ÿ”จ

URL Method Input Output
.../jobs GET - List of jobs
.../jobs POST List of jobs -
.../jobs/csv POST csv of jobs -

Employees ๐Ÿ‘ทโ€โ™‚๏ธ

URL Method Input Output
.../employees GET - List of employees
.../employees POST List of employees -
.../employees/csv POST csv of employees -

Stats ๐Ÿ“Š

URL Method Input Output
.../stats/a GET - Number of employees hired in 2021 for each job and department, divided by quarter
.../stats/b GET - Department that hired more employees than the mean of employees hired in 2021

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.