This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import uuid | |
import psycopg2.extras | |
from sqlalchemy import Column, MetaData, Table | |
from sqlalchemy.types import Integer, DateTime, TypeDecorator | |
from sqlalchemy.dialects.postgresql import ARRAY, array | |
from sqlalchemy.dialects.postgresql import UUID | |
from sqlalchemy.sql.expression import cast, literal, select |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import namedtuple | |
from marshmallow import Schema | |
from marshmallow.decorators import post_load | |
def class_and_schema(class_name, fields): | |
"""Create a class and its marshmallow schema. | |
Example:: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/CHANGELOG merge=union |