I am working on a GUI app for a bike rental service, and I need that every time when RENT A BIKE is click a new instance of the class customer is created.
below is an example of the GUI

import main
from BikeGUI.ADDSTOCK.add_stock import shp
#class which I want many instances of
customer = main.Customer()
#gui class
class Rent_Bike:
def __init__(self, top=None):
'''This class configures and populates the toplevel window.
top is the toplevel containing window.'''
#some gui definitions
top.geometry()
top.title()
...
...
...
...
#some more gui definitions
self.Label1 = tk.Label(top)
self.Label1.configure()
#more gui definitions
self.price = tk.Entry(top)
self.price.configure(text='''CodeName:''', .....)
...
...
...
#define tkinter variable
self.num_of_bikes = tk.StringVar()
self.Entry1.configure(insertbackground="black", textvariable=self.num_of_bikes)
...
...
...
def confirm_order(self):
#get number of bikes from entry
customer.bikes = self.num_of_bikes.get()
customer.rentalBasis = rent_bike_support.selected.get()
customer.codename = self.customername.get()
if __name__ == '__main__':
vp_start_gui()
that's the class in which I want the customer object to be instantiated several times, but the problem is that it only gets instantiated once, and it overwrites all the other customers that I created before
P.S I later need to import this customer object into another GUI file here's how I am importing it
from BikeGUI.rentbike.rent_bike import customer
but I think the problem is not with import it to another. Link to my files