Introduction:
Enums are a great way to represent a fixed set of values in your database. In this example, we'll model an IceCreamShop that serves various flavors of ice cream using SQLModel and PostgreSQL. We'll demonstrate how to store these flavors using enums and how to query for specific flavors using SQLAlchemy's powerful querying capabilities.
import os
from enum import Enum
from typing import List, Optional