这是indexloc提供的服务,不要输入任何密码
Skip to content

A Python Flask application simulating a shopping cart with the ability to apply various discounts.

Notifications You must be signed in to change notification settings

a1exw0ng/market-cart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Market-Cart Demo

Install

Clone this repository
git clone https://github.com/jdgranberry/market-cart.git
cd market-cart

Build the container image:
docker build -t market-cart:latest .

Run the container (this is for Linux, may not be the same on OSX/Windows):
docker run -d --network=host -p 5000:5000 --name market-cart market-cart

Usage

You can add a list of items to a cart and retrieve the total like so:
curl http://localhost:5000/cart?new=CH1,AP1,CF1,MK1

which results in
$20.34

Testing

Test cases are included. With the Python tox module, simply run
tox

About

A Python Flask application simulating a shopping cart with the ability to apply various discounts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages