Пример #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)
Пример #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
Пример #3
0
 def __init__(self, *args, **kwargs):
     old_init(self, *args, **kwargs)
     scoped_session.add(self)
Пример #4
0
 def __init__(self, *args, **kwargs):
     old_init(self, *args, **kwargs)
     scoped_session.add(self)
Пример #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