Source

pythonhk / src / pythonhk / api.py

1
2
3
4
5
6
7
8
from pythonhk.models import User

def find_user_by_id(session, id):
    return session.query(User).get(id)

def delete_user_by_id(session, id):
    return session.query(User).filter(User.id == id).delete()