Esempio n. 1
0
def insert_table(df):
    for index, row in df.iterrows():
        data = PredictionInputData()
        data.id = str(uuid.uuid1())
        scoped_session.add(data)
        scoped_session.commit()
    print(uuids)
Esempio n. 2
0
 def __init__(self, **kwargs):
     for key, value in kwargs.items():
         setattr(self, key, value)
     scoped_session.add(self) # new mapped objects will be automatically added to the session
Esempio n. 3
0
 def __init__(self, *args, **kwargs):
     old_init(self, *args, **kwargs)
     scoped_session.add(self)
Esempio n. 4
0
 def __init__(self, *args, **kwargs):
     old_init(self, *args, **kwargs)
     scoped_session.add(self)
Esempio n. 5
0
 def __init__(self, **kwargs):
     for key, value in kwargs.items():
         setattr(self, key, value)
     scoped_session.add(
         self
     )  # new mapped objects will be automatically added to the session