Code Monkey home page Code Monkey logo

shopping_cart's Introduction

Maintainability

shopping_cart

A shopping cart api designed in Python. The aim of this repo was to create a database wrapper using plain SQL and named tuples. Design patterns implemented include the singleton design pattern. Abstract Base Classes are used to create the DB interface. (SOLID principles.)

How to set up.

  • Create a postgres database.
  • Clone the repo.
  • Ensure you are on the dev branch.
  • Create a .env file from the .env_example.
  • Run command python create_tables.py. This runs the code in the file create_tables.py which creates the necessary tables for the application to work.

Run application

  • Run the command python run.py.

Expected output

 * Serving Flask app "app" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: on
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 125-482-972
  • Use postman to interact with application.

Project Overview

Endpoint Functionality Note
POST /auth/signup Register a user
POST /auth/login Login a user

Built With

  • FLask : Flask is a micro web framework written in Python.
  • abc : abc This module provides the infrastructure for defining abstract base classes (ABCs) in Python.

Authors

shopping_cart's People

Contributors

arthurarty avatar

Watchers

James Cloos avatar

Forkers

trinhnguyen212

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.