I am new to SQLAlchemy. I currently have:
ev = model.EnumerationValue(key=key_level_2, code=level_2) ev.keyvalues[key_parent] = level_1 model.Session.add(ev)
How can I change this so that it only adds an object if it does not already exist? That would be good...
model.Session.create_if_does_not_exist(ev)
Thanks!
sqlalchemy
AP257
source share