title: How to type-hint an Enum of strings in Python
body: <p>I was curious how I'd type-hint an enumeration of strings, for example:
  [&quot;keyword1&quot;, &quot;keyword2&quot;]</p>
  <p>I'd want some variable, v, to be equal to any of these string literals. I could accomplish this with a union of literals - Union[Literal[&quot;keyword1&quot;], Literal[&quot;keyword2&quot;]] but it'd be make maintainability difficult if one of these keywords gets changed in the future.
  Ideally, I'd want to define things like this:</p>
  <pre><code>class Keywords(enum):
     keywordOne = &quot;keyword1&quot;
     keywordTwo = &quot;keyword2&quot;
  v: valueOf[Keywords] = Keywords.keywordOne.value # v = &quot;keyword1&quot;
  </code></pre>
  <p>But I'm not sure how to accomplish something like this in MyPy</p>