Code Monkey home page Code Monkey logo

caredash-assignment's Introduction

CareDash coding assignment

Setup

Execute the following terminal commands

First, cd to src/doctor_model/init.py and modify the user, password, host, and database fields to connect to a mysql database of your choice.

Then, cd back to the root directory and execute the following command.

python3 src/main.py

Design

Scalability: this app uses flask's builtin testing server, which is not designed for a production workload. In order to scale up this app, one should deploy to a proper web server such as Apache or Nginx.

Error Handling: The server will respond with an error message in the event that a doctor/review doesn't exist, or in the event that the JSON field attached to a POST request is not properly formatted. The fields are case sensitive (e.g. 'doctor' is correct; 'Doctor' is incorrect'). When a post request successfully completes, a copy of the post request as well as a newly generated id field are returned.

Data Model: I replicated the data model as described in the assignment. The name field is not unique for doctors since there are doctors that share the same name.

Testing

  • GET/POST tested using postman chrome extension.

Libraries used

  • mysqlclient
  • flask
  • flask_sqlalchemy

caredash-assignment's People

Contributors

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