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)
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
def __init__(self, *args, **kwargs): old_init(self, *args, **kwargs) scoped_session.add(self)
def __init__(self, *args, **kwargs): old_init(self, *args, **kwargs) scoped_session.add(self)
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