title: How to create a Python class dynamically with `=` on the subclass argument
body: <p>Under certain conditions, Python allows the following:</p>
  <pre class="lang-py prettyprint-override"><code>class A(SQLModel, table=True):
      a = 1
  </code></pre>
  <p>as used by <a href="https://sqlmodel.tiangolo.com/#create-a-sqlmodel-model" rel="nofollow noreferrer">sqlmodel</a>'s API.</p>
  <p>The question: how can we generate the equivalent of the above dynamically,</p>
  <pre class="lang-py prettyprint-override"><code>type(&quot;A&quot;, (SQLModel, ???), {&quot;a&quot;: 1})
  </code></pre>