mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2025-08-15 19:30:47 +08:00
Deployed 4ab3bef to dev with MkDocs 1.2.4 and mike 1.1.2
This commit is contained in:
@ -1197,7 +1197,12 @@
|
||||
<li>For PostgreSQL: <code>pip install asyncpg</code></li>
|
||||
<li>For SQLite: <code>pip install aiosqlite</code></li>
|
||||
</ul>
|
||||
<p>For the sake of this tutorial from now on, we'll use a simple SQLite databse.</p>
|
||||
<p>Examples of <code>DB_URL</code>s are:</p>
|
||||
<ul>
|
||||
<li>PostgreSQL: <code>engine = create_engine('postgresql+asyncpg://user:password@host:port/name')</code></li>
|
||||
<li>SQLite: <code>engine = create_engine('sqlite+aiosqlite:///name.db')</code></li>
|
||||
</ul>
|
||||
<p>For the sake of this tutorial from now on, we'll use a simple SQLite database.</p>
|
||||
<h2 id="create-the-user-model">Create the User model<a class="headerlink" href="#create-the-user-model" title="Permanent link">¶</a></h2>
|
||||
<p>As for any SQLAlchemy ORM model, we'll create a <code>User</code> model.</p>
|
||||
<div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">AsyncGenerator</span>
|
||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Reference in New Issue
Block a user