minor PEP8 corrections

email
androiddrew 7 years ago
parent 36377d0b50
commit 7c88fe83c4

@ -3,6 +3,7 @@ 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)

@ -1,8 +1,9 @@
import datetime as dt
import decimal
def alchemyencoder(obj):
"""JSON encoder function for SQLAlchemy special classes."""
"""JSON encoder function with support for ISO 8601 datetime serialization and Decimal to float casting"""
if isinstance(obj, dt.datetime):
return obj.isoformat()
elif isinstance(obj, decimal.Decimal):

Loading…
Cancel
Save