from apistar import Command from apistar.backends.sqlalchemy_backend import Session from cookie_api.models.schema import User def create_user(session: Session, email, password): user = User(email, password) session.add(user) session.commit() print('User added') commands = [ Command('create_user', create_user) ]