Home > Learning, Lesson, Problem, Projects/Experiments, Python > Python: Coffee Consumption Part-1

Python: Coffee Consumption Part-1


Learning : Python, SQlite3, Dataset, Pandas,
Subject: Create Coffee Consumption Application.

[NOTE: To keep the code as simple as we can, We WILL NOT ADD any user input Varevecations. Assuming that our user will Enter the right inputs.]

Last week I post an articale about generating Fake Data-Set about Coffee Consumption, and using that dataset in ML and DeepLearning. [Read the Story]. I’ve got a request from someone asking to build a reall Full Application that can be used in a Coffee Shop and collect/track his Coffee orders (consumption). So here is the application.

Road Map

Brain Storming
In this python project will collent some informatin based on a friend requerment. Our Task is:

  • Data Gathering.
  • Designing the Database and Tables.
  • Writing python Functions to do the Following:
    • Create the Main-Menu. [Add, Edit, Delete for main Table]
    • Create the Manager Menu. [Add, Edit, Delete for each lookup Tables]
    • Create the database and the tables:
      • Main: coffee_con.
      • Lookup: coffee_name.
      • Lookup: coffee_type.
      • Lookup: coffee_size.
    • Inserting Zero record.
    • Inserting Basic Data in all Lookup tables.
    • Creating all Functions we need such as:
      • Add, Edit, Delete Coffee Names.
      • Add, Edit, Delete Coffee Types.
      • Add, Edit, Delete Coffee Sizes.

    ..:: In Part -1 ::..
    In this part, we will create a python file, and will write all the functions header [we think we may need] so late we can add the codes inside, of course we may add other functions later [if we miss it here].
    So, starting from the Main-Menu, we will have
    – Add New Order.
    – Edit an Order.
    – Delete an Order.
    – Show Orders.
    [… SETTING …]
    – Coffee Names, Type and Size Manager.
    – Create the database.
    – Back-up Data. (as CSV)
    – Exit.

    Here is just a sample of the code, in this part no much coding of the Functoins, as we said only Functions Names, the full code is available in the Download Page.[ Click Here ]

    # Sample of Functions Names in our Application 
    
    import os
    import sqlite3
    
    
    def header():
        pass
    
    def create_data_base () :
        pass
            
    def main_menu():
        pass    
    
    def new_record():
        pass
                
    def edit_record():
        pass
        
    def delete_record():
        pass
            
    def backup_dataset():
        pass
    
    
    

    … The above are just a sample of Functions that we may have in the application, you can download and read the Project file.

    What’s Coming: In Part-2 we will do the Follwing:

    • Writing the Main Menu Function.
    • Creating the DataBase.
    • Writing the Function to Create the Tables.
    • Inserting the Zero Records.

    ..:: Have Fun with Coding ::.. 🙂

    Part 1 Part 2 Part 3 Part 4

    To Download my Python code (.py) files Click-Here



    ali radwani ahradwani.com python projects codeFollow me on Twitter..

    By: Ali Radwani

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: