I want to create a pydantic Model with a Literal field, but the options should be derived from a list. Something like this:
from pydantic import BaseModel
from typing import Literal
opts=['foo','bar']
class MyModel(BaseModel):
    select_one : Literal[opts]
Is there some way this could be solved by enumeration?