def add_user(username, password, email): with session_scope() as s: u = tabledef.User(username=username, password=password.decode('utf8'), email=email) s.add(u) s.commit()
def add_symptom(name, severity): with session_scope() as s: u = tabledef.User(name=name, severity=severity) s.add(u) s.commit()