Skip to content

AliAbdelaal/Grocery-shop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Client-Server Grocery shop app with a GUI

A server that contains the prices and does all the calculations A client that consume the server data and view the products

app image


How it works

in here we adapted a very simple API that is as follows

the server expect the request to one of the following:

  • calculate the total cost
    {
        'request' : 'cash',
        'data': requests_dict {dict}
    }
    • note the request_dict is expected to be
      {
          'fruit' : amount {int},
          'fruit' : amount {int},
          .
          .
          .
      }
  • get the prices AKA menu
    {
        'request' : 'prices',
        'data': None
    }

the server responses is also so simple as follows:

  • in case of cash request
    {
    'request': 'cash',
    'data': total_cash {float}
    }
  • in case of prices request
    {
    'request' : 'prices',
    'data' : fruits_dict {dict}
    }
    • note that fruits_dict will be as follows
      {
      'fruit' : price {float}
      .
      .
      
      }

Releases

No releases published

Packages

 
 
 

Languages