This file contains hidden or 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 __future__ import annotations | |
from typing import Any, Dict, Generic, List, Optional, Type, TypeVar, Union, get_args, get_origin | |
from pydantic import BaseModel | |
from sqlalchemy.dialects.postgresql import JSONB | |
from sqlalchemy.types import TypeDecorator | |
T = TypeVar("T", bound=Union[BaseModel, dict, list]) |