You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
327 B
Python
17 lines
327 B
Python
from apistar import Command
|
|
from apistar.backends.sqlalchemy_backend import Session
|
|
|
|
from 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)
|
|
]
|