<h3 dir="auto">First check</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I added a very descriptive title to this issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I used the GitHub search to find a similar issue and didn't find it.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I searched the FastAPI documentation, with the integrated search.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already searched in Google "How to X in FastAPI" and didn't find any information.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already read and followed all the tutorial in the docs and didn't find an answer.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/samuelcolvin/pydantic">Pydantic</a>.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/swagger-api/swagger-ui">Swagger UI</a>.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/Redocly/redoc">ReDoc</a>.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> After submitting this, I commit to:
<ul dir="auto">
<li>Read open issues with questions until I find 2 issues where I can help someone and add a comment to help there.</li>
<li>Or, I already hit the "watch" button in this repository to receive notifications and I commit to help at least 2 people that ask questions in the future.</li>
<li>Implement a Pull Request for a confirmed bug.</li>
</ul>
</li>
</ul>

<h3 dir="auto">Example</h3>
<p dir="auto">Now:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from fastapi import FastAPI
from typing import Dict, List
app = FastAPI()


@app.get(&quot;/&quot;, response_model=Dict[str, List[str]])
def read_root():
    return {&quot;Hello&quot;: [&quot;tom&quot;, &quot;hesus&quot;]}"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">fastapi</span> <span class="pl-k">import</span> <span class="pl-v">FastAPI</span>
<span class="pl-k">from</span> <span class="pl-s1">typing</span> <span class="pl-k">import</span> <span class="pl-v">Dict</span>, <span class="pl-v">List</span>
<span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">FastAPI</span>()


<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">get</span>(<span class="pl-s">"/"</span>, <span class="pl-s1">response_model</span><span class="pl-c1">=</span><span class="pl-v">Dict</span>[<span class="pl-s1">str</span>, <span class="pl-v">List</span>[<span class="pl-s1">str</span>]])</span>
<span class="pl-k">def</span> <span class="pl-en">read_root</span>():
    <span class="pl-k">return</span> {<span class="pl-s">"Hello"</span>: [<span class="pl-s">"tom"</span>, <span class="pl-s">"hesus"</span>]}</pre></div>
<h3 dir="auto">The solution you would like</h3>
<p dir="auto">I want to do it through typehints:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from fastapi import FastAPI
from typing import Dict, List
app = FastAPI()


@app.get(&quot;/&quot;)
def read_root() -&gt; Dict[str, List[str]]:
    return {&quot;Hello&quot;: [&quot;tom&quot;, &quot;hesus&quot;]}"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">fastapi</span> <span class="pl-k">import</span> <span class="pl-v">FastAPI</span>
<span class="pl-k">from</span> <span class="pl-s1">typing</span> <span class="pl-k">import</span> <span class="pl-v">Dict</span>, <span class="pl-v">List</span>
<span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">FastAPI</span>()


<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">get</span>(<span class="pl-s">"/"</span>)</span>
<span class="pl-k">def</span> <span class="pl-en">read_root</span>() <span class="pl-c1">-&gt;</span> <span class="pl-v">Dict</span>[<span class="pl-s1">str</span>, <span class="pl-v">List</span>[<span class="pl-s1">str</span>]]:
    <span class="pl-k">return</span> {<span class="pl-s">"Hello"</span>: [<span class="pl-s">"tom"</span>, <span class="pl-s">"hesus"</span>]}</pre></div>
<p dir="auto">Hi!</p>
<p dir="auto">Some users or <code class="notranslate">ormar</code> approached me and asked me why <code class="notranslate">ormar</code> is not included in <code class="notranslate">FastAPI</code> documentation, as they wished they knew about it sooner.</p>
<p dir="auto">And I answered that I am not sure if including more orms is welcomed as I kind of cannot find a key what and why is included.<br>
I mean I get it why <code class="notranslate">sqlalchemy</code> and <code class="notranslate">encode/databases</code> (most popular sync orm (well since 1.4 also async) and most popular async repo), but why there is <code class="notranslate">Peewee</code> but not <code class="notranslate">Gino</code> or <code class="notranslate">Tortoise</code>?</p>
<p dir="auto"><a href="https://github.com/collerek/ormar"><code class="notranslate">ormar</code></a> originates from <a href="https://github.com/encode/orm"><code class="notranslate">encode/orm</code></a> and <a href="https://github.com/awesometoolbox/ormantic"><code class="notranslate">ormantic</code></a> (both unmaintained) and build on top of them. The goal was to create a simple ORM that can be used directly (as request and response models) with FastAPI because ormar bases it's data validation on <code class="notranslate">pydantic</code> (each ormar model is also a pydantic one).</p>
<p dir="auto">I can issue a PR for this but before I start I would like your input <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tiangolo/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tiangolo">@tiangolo</a>.<br>
Do you want to include more orms?<br>
Do you want to include <code class="notranslate">ormar</code>?</p>
<p dir="auto">Let me know what you think!<br>
And thanks for an awesome job with FastAPI! :)</p>