Automated deployment: Tue Jun 8 14:29:22 UTC 2021 22384f6405

This commit is contained in:
frankie567
2021-06-08 14:29:22 +00:00
parent 6b3ae71291
commit afcce32d6b
44 changed files with 1486 additions and 1404 deletions

View File

@@ -11,8 +11,8 @@
<link rel="icon" href="../../../favicon.png">
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-7.1.5">
<link rel="icon" href="../../favicon.png">
<meta name="generator" content="mkdocs-1.2, mkdocs-material-7.1.7">
@@ -20,10 +20,10 @@
<link rel="stylesheet" href="../../../assets/stylesheets/main.bde7dde4.min.css">
<link rel="stylesheet" href="../../assets/stylesheets/main.ca7ac06f.min.css">
<link rel="stylesheet" href="../../../assets/stylesheets/palette.ef6f36e2.min.css">
<link rel="stylesheet" href="../../assets/stylesheets/palette.f1a3b89f.min.css">
@@ -55,7 +55,7 @@
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="red" data-md-color-accent="red">
<script>function __prefix(e){return new URL("../../..",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script>
<script>function __prefix(e){return new URL("../..",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script>
<script>var palette=__get("__palette");if(null!==palette&&"object"==typeof palette.color)for(var key in palette.color)document.body.setAttribute("data-md-color-"+key,palette.color[key])</script>
@@ -76,7 +76,7 @@
<header class="md-header" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../../.." title="FastAPI Users" class="md-header__button md-logo" aria-label="FastAPI Users" data-md-component="logo">
<a href="../../index.html" title="FastAPI Users" class="md-header__button md-logo" aria-label="FastAPI Users" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M16.5 12A2.5 2.5 0 0 0 19 9.5 2.5 2.5 0 0 0 16.5 7 2.5 2.5 0 0 0 14 9.5a2.5 2.5 0 0 0 2.5 2.5M9 11a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m7.5 3c-1.83 0-5.5.92-5.5 2.75V19h11v-2.25c0-1.83-3.67-2.75-5.5-2.75M9 13c-2.33 0-7 1.17-7 3.5V19h7v-2.25c0-.85.33-2.34 2.37-3.47C10.5 13.1 9.66 13 9 13z"/></svg>
@@ -106,7 +106,7 @@
<input class="md-option" data-md-color-media="" data-md-color-scheme="default" data-md-color-primary="red" data-md-color-accent="red" type="radio" name="__palette" id="__palette_1">
<input class="md-option" data-md-color-media="" data-md-color-scheme="default" data-md-color-primary="red" data-md-color-accent="red" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_1">
<label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_2" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a7 7 0 0 0-7 7c0 2.38 1.19 4.47 3 5.74V17a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-2.26c1.81-1.27 3-3.36 3-5.74a7 7 0 0 0-7-7M9 21a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1v-1H9v1z"/></svg>
@@ -115,7 +115,7 @@
<input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="red" data-md-color-accent="red" type="radio" name="__palette" id="__palette_2">
<input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="red" data-md-color-accent="red" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_2">
<label class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a7 7 0 0 1 7 7c0 2.38-1.19 4.47-3 5.74V17a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1v-2.26C6.19 13.47 5 11.38 5 9a7 7 0 0 1 7-7M9 21v-1h6v1a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1m3-17a5 5 0 0 0-5 5c0 2.05 1.23 3.81 3 4.58V16h4v-2.42c1.77-.77 3-2.53 3-4.58a5 5 0 0 0-5-5z"/></svg>
@@ -191,7 +191,7 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href="../../.." title="FastAPI Users" class="md-nav__button md-logo" aria-label="FastAPI Users" data-md-component="logo">
<a href="../../index.html" title="FastAPI Users" class="md-nav__button md-logo" aria-label="FastAPI Users" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M16.5 12A2.5 2.5 0 0 0 19 9.5 2.5 2.5 0 0 0 16.5 7 2.5 2.5 0 0 0 14 9.5a2.5 2.5 0 0 0 2.5 2.5M9 11a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m7.5 3c-1.83 0-5.5.92-5.5 2.75V19h11v-2.25c0-1.83-3.67-2.75-5.5-2.75M9 13c-2.33 0-7 1.17-7 3.5V19h7v-2.25c0-.85.33-2.34 2.37-3.47C10.5 13.1 9.66 13 9 13z"/></svg>
@@ -223,7 +223,7 @@
<li class="md-nav__item">
<a href="../../.." class="md-nav__link">
<a href="../../index.html" class="md-nav__link">
About
</a>
</li>
@@ -238,7 +238,7 @@
<li class="md-nav__item">
<a href="../../../installation/" class="md-nav__link">
<a href="../../installation.html" class="md-nav__link">
Installation
</a>
</li>
@@ -276,7 +276,7 @@
<li class="md-nav__item">
<a href="../../model/" class="md-nav__link">
<a href="../model.html" class="md-nav__link">
User model
</a>
</li>
@@ -311,7 +311,7 @@
<li class="md-nav__item">
<a href="../sqlalchemy/" class="md-nav__link">
<a href="sqlalchemy.html" class="md-nav__link">
SQLAlchemy
</a>
</li>
@@ -337,7 +337,7 @@
<span class="md-nav__icon md-icon"></span>
</label>
<a href="./" class="md-nav__link md-nav__link--active">
<a href="mongodb.html" class="md-nav__link md-nav__link--active">
MongoDB
</a>
@@ -389,7 +389,7 @@
<li class="md-nav__item">
<a href="../tortoise/" class="md-nav__link">
<a href="tortoise.html" class="md-nav__link">
Tortoise ORM
</a>
</li>
@@ -401,7 +401,7 @@
<li class="md-nav__item">
<a href="../ormar/" class="md-nav__link">
<a href="ormar.html" class="md-nav__link">
Ormar
</a>
</li>
@@ -440,7 +440,7 @@
<li class="md-nav__item">
<a href="../../authentication/" class="md-nav__link">
<a href="../authentication/index.html" class="md-nav__link">
Introduction
</a>
</li>
@@ -452,7 +452,7 @@
<li class="md-nav__item">
<a href="../../authentication/jwt/" class="md-nav__link">
<a href="../authentication/jwt.html" class="md-nav__link">
JWT
</a>
</li>
@@ -464,7 +464,7 @@
<li class="md-nav__item">
<a href="../../authentication/cookie/" class="md-nav__link">
<a href="../authentication/cookie.html" class="md-nav__link">
Cookie
</a>
</li>
@@ -503,7 +503,7 @@
<li class="md-nav__item">
<a href="../../routers/" class="md-nav__link">
<a href="../routers/index.html" class="md-nav__link">
Introduction
</a>
</li>
@@ -515,7 +515,7 @@
<li class="md-nav__item">
<a href="../../routers/auth/" class="md-nav__link">
<a href="../routers/auth.html" class="md-nav__link">
Auth router
</a>
</li>
@@ -527,7 +527,7 @@
<li class="md-nav__item">
<a href="../../routers/register/" class="md-nav__link">
<a href="../routers/register.html" class="md-nav__link">
Register routes
</a>
</li>
@@ -539,7 +539,7 @@
<li class="md-nav__item">
<a href="../../routers/reset/" class="md-nav__link">
<a href="../routers/reset.html" class="md-nav__link">
Reset password router
</a>
</li>
@@ -551,7 +551,7 @@
<li class="md-nav__item">
<a href="../../routers/users/" class="md-nav__link">
<a href="../routers/users.html" class="md-nav__link">
Users router
</a>
</li>
@@ -563,7 +563,7 @@
<li class="md-nav__item">
<a href="../../routers/verify/" class="md-nav__link">
<a href="../routers/verify.html" class="md-nav__link">
Verify router
</a>
</li>
@@ -581,7 +581,7 @@
<li class="md-nav__item">
<a href="../../password-validation/" class="md-nav__link">
<a href="../password-validation.html" class="md-nav__link">
Password validation
</a>
</li>
@@ -593,7 +593,7 @@
<li class="md-nav__item">
<a href="../../full-example/" class="md-nav__link">
<a href="../full-example.html" class="md-nav__link">
Full example
</a>
</li>
@@ -605,7 +605,7 @@
<li class="md-nav__item">
<a href="../../oauth/" class="md-nav__link">
<a href="../oauth.html" class="md-nav__link">
OAuth2
</a>
</li>
@@ -647,7 +647,7 @@
<li class="md-nav__item">
<a href="../../../usage/flow/" class="md-nav__link">
<a href="../../usage/flow.html" class="md-nav__link">
Flow
</a>
</li>
@@ -659,7 +659,7 @@
<li class="md-nav__item">
<a href="../../../usage/routes/" class="md-nav__link">
<a href="../../usage/routes.html" class="md-nav__link">
Routes
</a>
</li>
@@ -671,7 +671,7 @@
<li class="md-nav__item">
<a href="../../../usage/dependency-callables/" class="md-nav__link">
<a href="../../usage/dependency-callables.html" class="md-nav__link">
Dependency callables
</a>
</li>
@@ -683,7 +683,7 @@
<li class="md-nav__item">
<a href="../../../usage/helpers/" class="md-nav__link">
<a href="../../usage/helpers.html" class="md-nav__link">
Helpers
</a>
</li>
@@ -725,7 +725,7 @@
<li class="md-nav__item">
<a href="../../../migration/08_to_1x/" class="md-nav__link">
<a href="../../migration/08_to_1x.html" class="md-nav__link">
0.8.x ➡️ 1.x.x
</a>
</li>
@@ -737,7 +737,7 @@
<li class="md-nav__item">
<a href="../../../migration/1x_to_2x/" class="md-nav__link">
<a href="../../migration/1x_to_2x.html" class="md-nav__link">
1.x.x ➡️ 2.x.x
</a>
</li>
@@ -749,7 +749,7 @@
<li class="md-nav__item">
<a href="../../../migration/2x_to_3x/" class="md-nav__link">
<a href="../../migration/2x_to_3x.html" class="md-nav__link">
2.x.x ➡️ 3.x.x
</a>
</li>
@@ -761,7 +761,7 @@
<li class="md-nav__item">
<a href="../../../migration/3x_to_4x/" class="md-nav__link">
<a href="../../migration/3x_to_4x.html" class="md-nav__link">
3.x.x ➡️ 4.x.x
</a>
</li>
@@ -773,7 +773,7 @@
<li class="md-nav__item">
<a href="../../../migration/4x_to_5x/" class="md-nav__link">
<a href="../../migration/4x_to_5x.html" class="md-nav__link">
4.x.x ➡️ 5.x.x
</a>
</li>
@@ -926,17 +926,17 @@
<span class="hll"><span class="n">user_db</span> <span class="o">=</span> <span class="n">MongoDBUserDatabase</span><span class="p">(</span><span class="n">UserDB</span><span class="p">,</span> <span class="n">collection</span><span class="p">)</span>
</span></code></pre></div>
<p>Notice that we pass a reference to your <a href="../../model/"><code>UserDB</code> model</a>.</p>
<p>Notice that we pass a reference to your <a href="../model.html"><code>UserDB</code> model</a>.</p>
<div class="admonition info">
<p class="admonition-title">Info</p>
<p>The database adapter will automatically create a <a href="https://docs.mongodb.com/manual/core/index-unique/">unique index</a> on <code>id</code> and <code>email</code>.</p>
</div>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p><strong>FastAPI Users</strong> will use its defined <a href="../../model/"><code>id</code> UUID</a> as unique identifier for the user, rather than the builtin MongoDB <code>_id</code>.</p>
<p><strong>FastAPI Users</strong> will use its defined <a href="../model.html"><code>id</code> UUID</a> as unique identifier for the user, rather than the builtin MongoDB <code>_id</code>.</p>
</div>
<h2 id="next-steps">Next steps<a class="headerlink" href="#next-steps" title="Permanent link">&para;</a></h2>
<p>We will now configure an <a href="../../authentication/">authentication method</a>.</p>
<p>We will now configure an <a href="../authentication/index.html">authentication method</a>.</p>
@@ -955,7 +955,8 @@
<nav class="md-footer__inner md-grid" aria-label="Footer">
<a href="../sqlalchemy/" class="md-footer__link md-footer__link--prev" rel="prev">
<a href="sqlalchemy.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: SQLAlchemy" rel="prev">
<div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
</div>
@@ -970,7 +971,8 @@
</a>
<a href="../tortoise/" class="md-footer__link md-footer__link--next" rel="next">
<a href="tortoise.html" class="md-footer__link md-footer__link--next" aria-label="Next: Tortoise ORM" rel="next">
<div class="md-footer__title">
<div class="md-ellipsis">
<span class="md-footer__direction">
@@ -1005,10 +1007,10 @@
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"base": "../../..", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}, "search": "../../../assets/javascripts/workers/search.d351de03.min.js", "version": null}</script>
<script id="__config" type="application/json">{"base": "../..", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "../../assets/javascripts/workers/search.b0710199.min.js", "version": null}</script>
<script src="../../../assets/javascripts/bundle.a1609d9a.min.js"></script>
<script src="../../assets/javascripts/bundle.76f349be.min.js"></script>
</body>

View File

@@ -11,8 +11,8 @@
<link rel="icon" href="../../../favicon.png">
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-7.1.5">
<link rel="icon" href="../../favicon.png">
<meta name="generator" content="mkdocs-1.2, mkdocs-material-7.1.7">
@@ -20,10 +20,10 @@
<link rel="stylesheet" href="../../../assets/stylesheets/main.bde7dde4.min.css">
<link rel="stylesheet" href="../../assets/stylesheets/main.ca7ac06f.min.css">
<link rel="stylesheet" href="../../../assets/stylesheets/palette.ef6f36e2.min.css">
<link rel="stylesheet" href="../../assets/stylesheets/palette.f1a3b89f.min.css">
@@ -55,7 +55,7 @@
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="red" data-md-color-accent="red">
<script>function __prefix(e){return new URL("../../..",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script>
<script>function __prefix(e){return new URL("../..",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script>
<script>var palette=__get("__palette");if(null!==palette&&"object"==typeof palette.color)for(var key in palette.color)document.body.setAttribute("data-md-color-"+key,palette.color[key])</script>
@@ -76,7 +76,7 @@
<header class="md-header" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../../.." title="FastAPI Users" class="md-header__button md-logo" aria-label="FastAPI Users" data-md-component="logo">
<a href="../../index.html" title="FastAPI Users" class="md-header__button md-logo" aria-label="FastAPI Users" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M16.5 12A2.5 2.5 0 0 0 19 9.5 2.5 2.5 0 0 0 16.5 7 2.5 2.5 0 0 0 14 9.5a2.5 2.5 0 0 0 2.5 2.5M9 11a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m7.5 3c-1.83 0-5.5.92-5.5 2.75V19h11v-2.25c0-1.83-3.67-2.75-5.5-2.75M9 13c-2.33 0-7 1.17-7 3.5V19h7v-2.25c0-.85.33-2.34 2.37-3.47C10.5 13.1 9.66 13 9 13z"/></svg>
@@ -106,7 +106,7 @@
<input class="md-option" data-md-color-media="" data-md-color-scheme="default" data-md-color-primary="red" data-md-color-accent="red" type="radio" name="__palette" id="__palette_1">
<input class="md-option" data-md-color-media="" data-md-color-scheme="default" data-md-color-primary="red" data-md-color-accent="red" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_1">
<label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_2" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a7 7 0 0 0-7 7c0 2.38 1.19 4.47 3 5.74V17a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-2.26c1.81-1.27 3-3.36 3-5.74a7 7 0 0 0-7-7M9 21a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1v-1H9v1z"/></svg>
@@ -115,7 +115,7 @@
<input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="red" data-md-color-accent="red" type="radio" name="__palette" id="__palette_2">
<input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="red" data-md-color-accent="red" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_2">
<label class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a7 7 0 0 1 7 7c0 2.38-1.19 4.47-3 5.74V17a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1v-2.26C6.19 13.47 5 11.38 5 9a7 7 0 0 1 7-7M9 21v-1h6v1a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1m3-17a5 5 0 0 0-5 5c0 2.05 1.23 3.81 3 4.58V16h4v-2.42c1.77-.77 3-2.53 3-4.58a5 5 0 0 0-5-5z"/></svg>
@@ -191,7 +191,7 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href="../../.." title="FastAPI Users" class="md-nav__button md-logo" aria-label="FastAPI Users" data-md-component="logo">
<a href="../../index.html" title="FastAPI Users" class="md-nav__button md-logo" aria-label="FastAPI Users" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M16.5 12A2.5 2.5 0 0 0 19 9.5 2.5 2.5 0 0 0 16.5 7 2.5 2.5 0 0 0 14 9.5a2.5 2.5 0 0 0 2.5 2.5M9 11a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m7.5 3c-1.83 0-5.5.92-5.5 2.75V19h11v-2.25c0-1.83-3.67-2.75-5.5-2.75M9 13c-2.33 0-7 1.17-7 3.5V19h7v-2.25c0-.85.33-2.34 2.37-3.47C10.5 13.1 9.66 13 9 13z"/></svg>
@@ -223,7 +223,7 @@
<li class="md-nav__item">
<a href="../../.." class="md-nav__link">
<a href="../../index.html" class="md-nav__link">
About
</a>
</li>
@@ -238,7 +238,7 @@
<li class="md-nav__item">
<a href="../../../installation/" class="md-nav__link">
<a href="../../installation.html" class="md-nav__link">
Installation
</a>
</li>
@@ -276,7 +276,7 @@
<li class="md-nav__item">
<a href="../../model/" class="md-nav__link">
<a href="../model.html" class="md-nav__link">
User model
</a>
</li>
@@ -311,7 +311,7 @@
<li class="md-nav__item">
<a href="../sqlalchemy/" class="md-nav__link">
<a href="sqlalchemy.html" class="md-nav__link">
SQLAlchemy
</a>
</li>
@@ -323,7 +323,7 @@
<li class="md-nav__item">
<a href="../mongodb/" class="md-nav__link">
<a href="mongodb.html" class="md-nav__link">
MongoDB
</a>
</li>
@@ -335,7 +335,7 @@
<li class="md-nav__item">
<a href="../tortoise/" class="md-nav__link">
<a href="tortoise.html" class="md-nav__link">
Tortoise ORM
</a>
</li>
@@ -361,7 +361,7 @@
<span class="md-nav__icon md-icon"></span>
</label>
<a href="./" class="md-nav__link md-nav__link--active">
<a href="ormar.html" class="md-nav__link md-nav__link--active">
Ormar
</a>
@@ -447,7 +447,7 @@
<li class="md-nav__item">
<a href="../../authentication/" class="md-nav__link">
<a href="../authentication/index.html" class="md-nav__link">
Introduction
</a>
</li>
@@ -459,7 +459,7 @@
<li class="md-nav__item">
<a href="../../authentication/jwt/" class="md-nav__link">
<a href="../authentication/jwt.html" class="md-nav__link">
JWT
</a>
</li>
@@ -471,7 +471,7 @@
<li class="md-nav__item">
<a href="../../authentication/cookie/" class="md-nav__link">
<a href="../authentication/cookie.html" class="md-nav__link">
Cookie
</a>
</li>
@@ -510,7 +510,7 @@
<li class="md-nav__item">
<a href="../../routers/" class="md-nav__link">
<a href="../routers/index.html" class="md-nav__link">
Introduction
</a>
</li>
@@ -522,7 +522,7 @@
<li class="md-nav__item">
<a href="../../routers/auth/" class="md-nav__link">
<a href="../routers/auth.html" class="md-nav__link">
Auth router
</a>
</li>
@@ -534,7 +534,7 @@
<li class="md-nav__item">
<a href="../../routers/register/" class="md-nav__link">
<a href="../routers/register.html" class="md-nav__link">
Register routes
</a>
</li>
@@ -546,7 +546,7 @@
<li class="md-nav__item">
<a href="../../routers/reset/" class="md-nav__link">
<a href="../routers/reset.html" class="md-nav__link">
Reset password router
</a>
</li>
@@ -558,7 +558,7 @@
<li class="md-nav__item">
<a href="../../routers/users/" class="md-nav__link">
<a href="../routers/users.html" class="md-nav__link">
Users router
</a>
</li>
@@ -570,7 +570,7 @@
<li class="md-nav__item">
<a href="../../routers/verify/" class="md-nav__link">
<a href="../routers/verify.html" class="md-nav__link">
Verify router
</a>
</li>
@@ -588,7 +588,7 @@
<li class="md-nav__item">
<a href="../../password-validation/" class="md-nav__link">
<a href="../password-validation.html" class="md-nav__link">
Password validation
</a>
</li>
@@ -600,7 +600,7 @@
<li class="md-nav__item">
<a href="../../full-example/" class="md-nav__link">
<a href="../full-example.html" class="md-nav__link">
Full example
</a>
</li>
@@ -612,7 +612,7 @@
<li class="md-nav__item">
<a href="../../oauth/" class="md-nav__link">
<a href="../oauth.html" class="md-nav__link">
OAuth2
</a>
</li>
@@ -654,7 +654,7 @@
<li class="md-nav__item">
<a href="../../../usage/flow/" class="md-nav__link">
<a href="../../usage/flow.html" class="md-nav__link">
Flow
</a>
</li>
@@ -666,7 +666,7 @@
<li class="md-nav__item">
<a href="../../../usage/routes/" class="md-nav__link">
<a href="../../usage/routes.html" class="md-nav__link">
Routes
</a>
</li>
@@ -678,7 +678,7 @@
<li class="md-nav__item">
<a href="../../../usage/dependency-callables/" class="md-nav__link">
<a href="../../usage/dependency-callables.html" class="md-nav__link">
Dependency callables
</a>
</li>
@@ -690,7 +690,7 @@
<li class="md-nav__item">
<a href="../../../usage/helpers/" class="md-nav__link">
<a href="../../usage/helpers.html" class="md-nav__link">
Helpers
</a>
</li>
@@ -732,7 +732,7 @@
<li class="md-nav__item">
<a href="../../../migration/08_to_1x/" class="md-nav__link">
<a href="../../migration/08_to_1x.html" class="md-nav__link">
0.8.x ➡️ 1.x.x
</a>
</li>
@@ -744,7 +744,7 @@
<li class="md-nav__item">
<a href="../../../migration/1x_to_2x/" class="md-nav__link">
<a href="../../migration/1x_to_2x.html" class="md-nav__link">
1.x.x ➡️ 2.x.x
</a>
</li>
@@ -756,7 +756,7 @@
<li class="md-nav__item">
<a href="../../../migration/2x_to_3x/" class="md-nav__link">
<a href="../../migration/2x_to_3x.html" class="md-nav__link">
2.x.x ➡️ 3.x.x
</a>
</li>
@@ -768,7 +768,7 @@
<li class="md-nav__item">
<a href="../../../migration/3x_to_4x/" class="md-nav__link">
<a href="../../migration/3x_to_4x.html" class="md-nav__link">
3.x.x ➡️ 4.x.x
</a>
</li>
@@ -780,7 +780,7 @@
<li class="md-nav__item">
<a href="../../../migration/4x_to_5x/" class="md-nav__link">
<a href="../../migration/4x_to_5x.html" class="md-nav__link">
4.x.x ➡️ 5.x.x
</a>
</li>
@@ -992,7 +992,7 @@ database configuration and the users logic. Create it like this.</p>
<span class="k">if</span> <span class="n">database_</span><span class="o">.</span><span class="n">is_connected</span><span class="p">:</span>
<span class="k">await</span> <span class="n">database_</span><span class="o">.</span><span class="n">disconnect</span><span class="p">()</span>
</code></pre></div>
<p>Notice that we pass a reference to your <a href="../../model/"><code>UserDB</code> model</a>.</p>
<p>Notice that we pass a reference to your <a href="../model.html"><code>UserDB</code> model</a>.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>In production, it's strongly recommended to setup a migration system to
@@ -1000,7 +1000,7 @@ update your SQL schemas. See
<a href="https://alembic.sqlalchemy.org/en/latest/">Alembic</a>.</p>
</div>
<h2 id="next-steps">Next steps<a class="headerlink" href="#next-steps" title="Permanent link">&para;</a></h2>
<p>We will now configure an <a href="../../authentication/">authentication method</a>.</p>
<p>We will now configure an <a href="../authentication/index.html">authentication method</a>.</p>
@@ -1019,7 +1019,8 @@ update your SQL schemas. See
<nav class="md-footer__inner md-grid" aria-label="Footer">
<a href="../tortoise/" class="md-footer__link md-footer__link--prev" rel="prev">
<a href="tortoise.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: Tortoise ORM" rel="prev">
<div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
</div>
@@ -1034,7 +1035,8 @@ update your SQL schemas. See
</a>
<a href="../../authentication/" class="md-footer__link md-footer__link--next" rel="next">
<a href="../authentication/index.html" class="md-footer__link md-footer__link--next" aria-label="Next: Introduction" rel="next">
<div class="md-footer__title">
<div class="md-ellipsis">
<span class="md-footer__direction">
@@ -1069,10 +1071,10 @@ update your SQL schemas. See
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"base": "../../..", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}, "search": "../../../assets/javascripts/workers/search.d351de03.min.js", "version": null}</script>
<script id="__config" type="application/json">{"base": "../..", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "../../assets/javascripts/workers/search.b0710199.min.js", "version": null}</script>
<script src="../../../assets/javascripts/bundle.a1609d9a.min.js"></script>
<script src="../../assets/javascripts/bundle.76f349be.min.js"></script>
</body>

View File

@@ -11,8 +11,8 @@
<link rel="icon" href="../../../favicon.png">
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-7.1.5">
<link rel="icon" href="../../favicon.png">
<meta name="generator" content="mkdocs-1.2, mkdocs-material-7.1.7">
@@ -20,10 +20,10 @@
<link rel="stylesheet" href="../../../assets/stylesheets/main.bde7dde4.min.css">
<link rel="stylesheet" href="../../assets/stylesheets/main.ca7ac06f.min.css">
<link rel="stylesheet" href="../../../assets/stylesheets/palette.ef6f36e2.min.css">
<link rel="stylesheet" href="../../assets/stylesheets/palette.f1a3b89f.min.css">
@@ -55,7 +55,7 @@
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="red" data-md-color-accent="red">
<script>function __prefix(e){return new URL("../../..",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script>
<script>function __prefix(e){return new URL("../..",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script>
<script>var palette=__get("__palette");if(null!==palette&&"object"==typeof palette.color)for(var key in palette.color)document.body.setAttribute("data-md-color-"+key,palette.color[key])</script>
@@ -76,7 +76,7 @@
<header class="md-header" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../../.." title="FastAPI Users" class="md-header__button md-logo" aria-label="FastAPI Users" data-md-component="logo">
<a href="../../index.html" title="FastAPI Users" class="md-header__button md-logo" aria-label="FastAPI Users" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M16.5 12A2.5 2.5 0 0 0 19 9.5 2.5 2.5 0 0 0 16.5 7 2.5 2.5 0 0 0 14 9.5a2.5 2.5 0 0 0 2.5 2.5M9 11a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m7.5 3c-1.83 0-5.5.92-5.5 2.75V19h11v-2.25c0-1.83-3.67-2.75-5.5-2.75M9 13c-2.33 0-7 1.17-7 3.5V19h7v-2.25c0-.85.33-2.34 2.37-3.47C10.5 13.1 9.66 13 9 13z"/></svg>
@@ -106,7 +106,7 @@
<input class="md-option" data-md-color-media="" data-md-color-scheme="default" data-md-color-primary="red" data-md-color-accent="red" type="radio" name="__palette" id="__palette_1">
<input class="md-option" data-md-color-media="" data-md-color-scheme="default" data-md-color-primary="red" data-md-color-accent="red" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_1">
<label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_2" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a7 7 0 0 0-7 7c0 2.38 1.19 4.47 3 5.74V17a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-2.26c1.81-1.27 3-3.36 3-5.74a7 7 0 0 0-7-7M9 21a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1v-1H9v1z"/></svg>
@@ -115,7 +115,7 @@
<input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="red" data-md-color-accent="red" type="radio" name="__palette" id="__palette_2">
<input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="red" data-md-color-accent="red" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_2">
<label class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a7 7 0 0 1 7 7c0 2.38-1.19 4.47-3 5.74V17a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1v-2.26C6.19 13.47 5 11.38 5 9a7 7 0 0 1 7-7M9 21v-1h6v1a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1m3-17a5 5 0 0 0-5 5c0 2.05 1.23 3.81 3 4.58V16h4v-2.42c1.77-.77 3-2.53 3-4.58a5 5 0 0 0-5-5z"/></svg>
@@ -191,7 +191,7 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href="../../.." title="FastAPI Users" class="md-nav__button md-logo" aria-label="FastAPI Users" data-md-component="logo">
<a href="../../index.html" title="FastAPI Users" class="md-nav__button md-logo" aria-label="FastAPI Users" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M16.5 12A2.5 2.5 0 0 0 19 9.5 2.5 2.5 0 0 0 16.5 7 2.5 2.5 0 0 0 14 9.5a2.5 2.5 0 0 0 2.5 2.5M9 11a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m7.5 3c-1.83 0-5.5.92-5.5 2.75V19h11v-2.25c0-1.83-3.67-2.75-5.5-2.75M9 13c-2.33 0-7 1.17-7 3.5V19h7v-2.25c0-.85.33-2.34 2.37-3.47C10.5 13.1 9.66 13 9 13z"/></svg>
@@ -223,7 +223,7 @@
<li class="md-nav__item">
<a href="../../.." class="md-nav__link">
<a href="../../index.html" class="md-nav__link">
About
</a>
</li>
@@ -238,7 +238,7 @@
<li class="md-nav__item">
<a href="../../../installation/" class="md-nav__link">
<a href="../../installation.html" class="md-nav__link">
Installation
</a>
</li>
@@ -276,7 +276,7 @@
<li class="md-nav__item">
<a href="../../model/" class="md-nav__link">
<a href="../model.html" class="md-nav__link">
User model
</a>
</li>
@@ -325,7 +325,7 @@
<span class="md-nav__icon md-icon"></span>
</label>
<a href="./" class="md-nav__link md-nav__link--active">
<a href="sqlalchemy.html" class="md-nav__link md-nav__link--active">
SQLAlchemy
</a>
@@ -398,7 +398,7 @@
<li class="md-nav__item">
<a href="../mongodb/" class="md-nav__link">
<a href="mongodb.html" class="md-nav__link">
MongoDB
</a>
</li>
@@ -410,7 +410,7 @@
<li class="md-nav__item">
<a href="../tortoise/" class="md-nav__link">
<a href="tortoise.html" class="md-nav__link">
Tortoise ORM
</a>
</li>
@@ -422,7 +422,7 @@
<li class="md-nav__item">
<a href="../ormar/" class="md-nav__link">
<a href="ormar.html" class="md-nav__link">
Ormar
</a>
</li>
@@ -461,7 +461,7 @@
<li class="md-nav__item">
<a href="../../authentication/" class="md-nav__link">
<a href="../authentication/index.html" class="md-nav__link">
Introduction
</a>
</li>
@@ -473,7 +473,7 @@
<li class="md-nav__item">
<a href="../../authentication/jwt/" class="md-nav__link">
<a href="../authentication/jwt.html" class="md-nav__link">
JWT
</a>
</li>
@@ -485,7 +485,7 @@
<li class="md-nav__item">
<a href="../../authentication/cookie/" class="md-nav__link">
<a href="../authentication/cookie.html" class="md-nav__link">
Cookie
</a>
</li>
@@ -524,7 +524,7 @@
<li class="md-nav__item">
<a href="../../routers/" class="md-nav__link">
<a href="../routers/index.html" class="md-nav__link">
Introduction
</a>
</li>
@@ -536,7 +536,7 @@
<li class="md-nav__item">
<a href="../../routers/auth/" class="md-nav__link">
<a href="../routers/auth.html" class="md-nav__link">
Auth router
</a>
</li>
@@ -548,7 +548,7 @@
<li class="md-nav__item">
<a href="../../routers/register/" class="md-nav__link">
<a href="../routers/register.html" class="md-nav__link">
Register routes
</a>
</li>
@@ -560,7 +560,7 @@
<li class="md-nav__item">
<a href="../../routers/reset/" class="md-nav__link">
<a href="../routers/reset.html" class="md-nav__link">
Reset password router
</a>
</li>
@@ -572,7 +572,7 @@
<li class="md-nav__item">
<a href="../../routers/users/" class="md-nav__link">
<a href="../routers/users.html" class="md-nav__link">
Users router
</a>
</li>
@@ -584,7 +584,7 @@
<li class="md-nav__item">
<a href="../../routers/verify/" class="md-nav__link">
<a href="../routers/verify.html" class="md-nav__link">
Verify router
</a>
</li>
@@ -602,7 +602,7 @@
<li class="md-nav__item">
<a href="../../password-validation/" class="md-nav__link">
<a href="../password-validation.html" class="md-nav__link">
Password validation
</a>
</li>
@@ -614,7 +614,7 @@
<li class="md-nav__item">
<a href="../../full-example/" class="md-nav__link">
<a href="../full-example.html" class="md-nav__link">
Full example
</a>
</li>
@@ -626,7 +626,7 @@
<li class="md-nav__item">
<a href="../../oauth/" class="md-nav__link">
<a href="../oauth.html" class="md-nav__link">
OAuth2
</a>
</li>
@@ -668,7 +668,7 @@
<li class="md-nav__item">
<a href="../../../usage/flow/" class="md-nav__link">
<a href="../../usage/flow.html" class="md-nav__link">
Flow
</a>
</li>
@@ -680,7 +680,7 @@
<li class="md-nav__item">
<a href="../../../usage/routes/" class="md-nav__link">
<a href="../../usage/routes.html" class="md-nav__link">
Routes
</a>
</li>
@@ -692,7 +692,7 @@
<li class="md-nav__item">
<a href="../../../usage/dependency-callables/" class="md-nav__link">
<a href="../../usage/dependency-callables.html" class="md-nav__link">
Dependency callables
</a>
</li>
@@ -704,7 +704,7 @@
<li class="md-nav__item">
<a href="../../../usage/helpers/" class="md-nav__link">
<a href="../../usage/helpers.html" class="md-nav__link">
Helpers
</a>
</li>
@@ -746,7 +746,7 @@
<li class="md-nav__item">
<a href="../../../migration/08_to_1x/" class="md-nav__link">
<a href="../../migration/08_to_1x.html" class="md-nav__link">
0.8.x ➡️ 1.x.x
</a>
</li>
@@ -758,7 +758,7 @@
<li class="md-nav__item">
<a href="../../../migration/1x_to_2x/" class="md-nav__link">
<a href="../../migration/1x_to_2x.html" class="md-nav__link">
1.x.x ➡️ 2.x.x
</a>
</li>
@@ -770,7 +770,7 @@
<li class="md-nav__item">
<a href="../../../migration/2x_to_3x/" class="md-nav__link">
<a href="../../migration/2x_to_3x.html" class="md-nav__link">
2.x.x ➡️ 3.x.x
</a>
</li>
@@ -782,7 +782,7 @@
<li class="md-nav__item">
<a href="../../../migration/3x_to_4x/" class="md-nav__link">
<a href="../../migration/3x_to_4x.html" class="md-nav__link">
3.x.x ➡️ 4.x.x
</a>
</li>
@@ -794,7 +794,7 @@
<li class="md-nav__item">
<a href="../../../migration/4x_to_5x/" class="md-nav__link">
<a href="../../migration/4x_to_5x.html" class="md-nav__link">
4.x.x ➡️ 5.x.x
</a>
</li>
@@ -1079,12 +1079,12 @@
</code></pre></div>
<p>Notice that we pass it three things:</p>
<ul>
<li>A reference to your <a href="../../model/"><code>UserDB</code> model</a>.</li>
<li>A reference to your <a href="../model.html"><code>UserDB</code> model</a>.</li>
<li>The <code>users</code> variable, which is the actual SQLAlchemy table behind the table class.</li>
<li>A <code>database</code> instance, which allows us to do asynchronous request to the database.</li>
</ul>
<h2 id="next-steps">Next steps<a class="headerlink" href="#next-steps" title="Permanent link">&para;</a></h2>
<p>We will now configure an <a href="../../authentication/">authentication method</a>.</p>
<p>We will now configure an <a href="../authentication/index.html">authentication method</a>.</p>
<h2 id="what-about-sqlalchemy-orm">What about SQLAlchemy ORM?<a class="headerlink" href="#what-about-sqlalchemy-orm" title="Permanent link">&para;</a></h2>
<p>The primary objective was to use pure async approach as much as possible. However, we understand that ORM is convenient and useful for many developers. If this feature becomes very demanded, we will add a database adapter for SQLAlchemy ORM.</p>
@@ -1105,7 +1105,8 @@
<nav class="md-footer__inner md-grid" aria-label="Footer">
<a href="../../model/" class="md-footer__link md-footer__link--prev" rel="prev">
<a href="../model.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: User model" rel="prev">
<div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
</div>
@@ -1120,7 +1121,8 @@
</a>
<a href="../mongodb/" class="md-footer__link md-footer__link--next" rel="next">
<a href="mongodb.html" class="md-footer__link md-footer__link--next" aria-label="Next: MongoDB" rel="next">
<div class="md-footer__title">
<div class="md-ellipsis">
<span class="md-footer__direction">
@@ -1155,10 +1157,10 @@
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"base": "../../..", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}, "search": "../../../assets/javascripts/workers/search.d351de03.min.js", "version": null}</script>
<script id="__config" type="application/json">{"base": "../..", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "../../assets/javascripts/workers/search.b0710199.min.js", "version": null}</script>
<script src="../../../assets/javascripts/bundle.a1609d9a.min.js"></script>
<script src="../../assets/javascripts/bundle.76f349be.min.js"></script>
</body>

View File

@@ -11,8 +11,8 @@
<link rel="icon" href="../../../favicon.png">
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-7.1.5">
<link rel="icon" href="../../favicon.png">
<meta name="generator" content="mkdocs-1.2, mkdocs-material-7.1.7">
@@ -20,10 +20,10 @@
<link rel="stylesheet" href="../../../assets/stylesheets/main.bde7dde4.min.css">
<link rel="stylesheet" href="../../assets/stylesheets/main.ca7ac06f.min.css">
<link rel="stylesheet" href="../../../assets/stylesheets/palette.ef6f36e2.min.css">
<link rel="stylesheet" href="../../assets/stylesheets/palette.f1a3b89f.min.css">
@@ -55,7 +55,7 @@
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="red" data-md-color-accent="red">
<script>function __prefix(e){return new URL("../../..",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script>
<script>function __prefix(e){return new URL("../..",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script>
<script>var palette=__get("__palette");if(null!==palette&&"object"==typeof palette.color)for(var key in palette.color)document.body.setAttribute("data-md-color-"+key,palette.color[key])</script>
@@ -76,7 +76,7 @@
<header class="md-header" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../../.." title="FastAPI Users" class="md-header__button md-logo" aria-label="FastAPI Users" data-md-component="logo">
<a href="../../index.html" title="FastAPI Users" class="md-header__button md-logo" aria-label="FastAPI Users" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M16.5 12A2.5 2.5 0 0 0 19 9.5 2.5 2.5 0 0 0 16.5 7 2.5 2.5 0 0 0 14 9.5a2.5 2.5 0 0 0 2.5 2.5M9 11a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m7.5 3c-1.83 0-5.5.92-5.5 2.75V19h11v-2.25c0-1.83-3.67-2.75-5.5-2.75M9 13c-2.33 0-7 1.17-7 3.5V19h7v-2.25c0-.85.33-2.34 2.37-3.47C10.5 13.1 9.66 13 9 13z"/></svg>
@@ -106,7 +106,7 @@
<input class="md-option" data-md-color-media="" data-md-color-scheme="default" data-md-color-primary="red" data-md-color-accent="red" type="radio" name="__palette" id="__palette_1">
<input class="md-option" data-md-color-media="" data-md-color-scheme="default" data-md-color-primary="red" data-md-color-accent="red" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_1">
<label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_2" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a7 7 0 0 0-7 7c0 2.38 1.19 4.47 3 5.74V17a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-2.26c1.81-1.27 3-3.36 3-5.74a7 7 0 0 0-7-7M9 21a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1v-1H9v1z"/></svg>
@@ -115,7 +115,7 @@
<input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="red" data-md-color-accent="red" type="radio" name="__palette" id="__palette_2">
<input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="red" data-md-color-accent="red" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_2">
<label class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a7 7 0 0 1 7 7c0 2.38-1.19 4.47-3 5.74V17a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1v-2.26C6.19 13.47 5 11.38 5 9a7 7 0 0 1 7-7M9 21v-1h6v1a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1m3-17a5 5 0 0 0-5 5c0 2.05 1.23 3.81 3 4.58V16h4v-2.42c1.77-.77 3-2.53 3-4.58a5 5 0 0 0-5-5z"/></svg>
@@ -191,7 +191,7 @@
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href="../../.." title="FastAPI Users" class="md-nav__button md-logo" aria-label="FastAPI Users" data-md-component="logo">
<a href="../../index.html" title="FastAPI Users" class="md-nav__button md-logo" aria-label="FastAPI Users" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M16.5 12A2.5 2.5 0 0 0 19 9.5 2.5 2.5 0 0 0 16.5 7 2.5 2.5 0 0 0 14 9.5a2.5 2.5 0 0 0 2.5 2.5M9 11a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m7.5 3c-1.83 0-5.5.92-5.5 2.75V19h11v-2.25c0-1.83-3.67-2.75-5.5-2.75M9 13c-2.33 0-7 1.17-7 3.5V19h7v-2.25c0-.85.33-2.34 2.37-3.47C10.5 13.1 9.66 13 9 13z"/></svg>
@@ -223,7 +223,7 @@
<li class="md-nav__item">
<a href="../../.." class="md-nav__link">
<a href="../../index.html" class="md-nav__link">
About
</a>
</li>
@@ -238,7 +238,7 @@
<li class="md-nav__item">
<a href="../../../installation/" class="md-nav__link">
<a href="../../installation.html" class="md-nav__link">
Installation
</a>
</li>
@@ -276,7 +276,7 @@
<li class="md-nav__item">
<a href="../../model/" class="md-nav__link">
<a href="../model.html" class="md-nav__link">
User model
</a>
</li>
@@ -311,7 +311,7 @@
<li class="md-nav__item">
<a href="../sqlalchemy/" class="md-nav__link">
<a href="sqlalchemy.html" class="md-nav__link">
SQLAlchemy
</a>
</li>
@@ -323,7 +323,7 @@
<li class="md-nav__item">
<a href="../mongodb/" class="md-nav__link">
<a href="mongodb.html" class="md-nav__link">
MongoDB
</a>
</li>
@@ -349,7 +349,7 @@
<span class="md-nav__icon md-icon"></span>
</label>
<a href="./" class="md-nav__link md-nav__link--active">
<a href="tortoise.html" class="md-nav__link md-nav__link--active">
Tortoise ORM
</a>
@@ -422,7 +422,7 @@
<li class="md-nav__item">
<a href="../ormar/" class="md-nav__link">
<a href="ormar.html" class="md-nav__link">
Ormar
</a>
</li>
@@ -461,7 +461,7 @@
<li class="md-nav__item">
<a href="../../authentication/" class="md-nav__link">
<a href="../authentication/index.html" class="md-nav__link">
Introduction
</a>
</li>
@@ -473,7 +473,7 @@
<li class="md-nav__item">
<a href="../../authentication/jwt/" class="md-nav__link">
<a href="../authentication/jwt.html" class="md-nav__link">
JWT
</a>
</li>
@@ -485,7 +485,7 @@
<li class="md-nav__item">
<a href="../../authentication/cookie/" class="md-nav__link">
<a href="../authentication/cookie.html" class="md-nav__link">
Cookie
</a>
</li>
@@ -524,7 +524,7 @@
<li class="md-nav__item">
<a href="../../routers/" class="md-nav__link">
<a href="../routers/index.html" class="md-nav__link">
Introduction
</a>
</li>
@@ -536,7 +536,7 @@
<li class="md-nav__item">
<a href="../../routers/auth/" class="md-nav__link">
<a href="../routers/auth.html" class="md-nav__link">
Auth router
</a>
</li>
@@ -548,7 +548,7 @@
<li class="md-nav__item">
<a href="../../routers/register/" class="md-nav__link">
<a href="../routers/register.html" class="md-nav__link">
Register routes
</a>
</li>
@@ -560,7 +560,7 @@
<li class="md-nav__item">
<a href="../../routers/reset/" class="md-nav__link">
<a href="../routers/reset.html" class="md-nav__link">
Reset password router
</a>
</li>
@@ -572,7 +572,7 @@
<li class="md-nav__item">
<a href="../../routers/users/" class="md-nav__link">
<a href="../routers/users.html" class="md-nav__link">
Users router
</a>
</li>
@@ -584,7 +584,7 @@
<li class="md-nav__item">
<a href="../../routers/verify/" class="md-nav__link">
<a href="../routers/verify.html" class="md-nav__link">
Verify router
</a>
</li>
@@ -602,7 +602,7 @@
<li class="md-nav__item">
<a href="../../password-validation/" class="md-nav__link">
<a href="../password-validation.html" class="md-nav__link">
Password validation
</a>
</li>
@@ -614,7 +614,7 @@
<li class="md-nav__item">
<a href="../../full-example/" class="md-nav__link">
<a href="../full-example.html" class="md-nav__link">
Full example
</a>
</li>
@@ -626,7 +626,7 @@
<li class="md-nav__item">
<a href="../../oauth/" class="md-nav__link">
<a href="../oauth.html" class="md-nav__link">
OAuth2
</a>
</li>
@@ -668,7 +668,7 @@
<li class="md-nav__item">
<a href="../../../usage/flow/" class="md-nav__link">
<a href="../../usage/flow.html" class="md-nav__link">
Flow
</a>
</li>
@@ -680,7 +680,7 @@
<li class="md-nav__item">
<a href="../../../usage/routes/" class="md-nav__link">
<a href="../../usage/routes.html" class="md-nav__link">
Routes
</a>
</li>
@@ -692,7 +692,7 @@
<li class="md-nav__item">
<a href="../../../usage/dependency-callables/" class="md-nav__link">
<a href="../../usage/dependency-callables.html" class="md-nav__link">
Dependency callables
</a>
</li>
@@ -704,7 +704,7 @@
<li class="md-nav__item">
<a href="../../../usage/helpers/" class="md-nav__link">
<a href="../../usage/helpers.html" class="md-nav__link">
Helpers
</a>
</li>
@@ -746,7 +746,7 @@
<li class="md-nav__item">
<a href="../../../migration/08_to_1x/" class="md-nav__link">
<a href="../../migration/08_to_1x.html" class="md-nav__link">
0.8.x ➡️ 1.x.x
</a>
</li>
@@ -758,7 +758,7 @@
<li class="md-nav__item">
<a href="../../../migration/1x_to_2x/" class="md-nav__link">
<a href="../../migration/1x_to_2x.html" class="md-nav__link">
1.x.x ➡️ 2.x.x
</a>
</li>
@@ -770,7 +770,7 @@
<li class="md-nav__item">
<a href="../../../migration/2x_to_3x/" class="md-nav__link">
<a href="../../migration/2x_to_3x.html" class="md-nav__link">
2.x.x ➡️ 3.x.x
</a>
</li>
@@ -782,7 +782,7 @@
<li class="md-nav__item">
<a href="../../../migration/3x_to_4x/" class="md-nav__link">
<a href="../../migration/3x_to_4x.html" class="md-nav__link">
3.x.x ➡️ 4.x.x
</a>
</li>
@@ -794,7 +794,7 @@
<li class="md-nav__item">
<a href="../../../migration/4x_to_5x/" class="md-nav__link">
<a href="../../migration/4x_to_5x.html" class="md-nav__link">
4.x.x ➡️ 5.x.x
</a>
</li>
@@ -1029,7 +1029,7 @@
<span class="n">generate_schemas</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="p">)</span>
</code></pre></div>
<p>Notice that we pass a reference to your <a href="../../model/"><code>UserDB</code> model</a>.</p>
<p>Notice that we pass a reference to your <a href="../model.html"><code>UserDB</code> model</a>.</p>
<h2 id="register-tortoise">Register Tortoise<a class="headerlink" href="#register-tortoise" title="Permanent link">&para;</a></h2>
<p>For using Tortoise ORM we must register our models and database.</p>
<p>Tortoise ORM supports integration with FastAPI out-of-the-box. It will automatically bind startup and shutdown events.</p>
@@ -1079,7 +1079,7 @@
<p>In production, it's strongly recommended to setup a migration system to update your SQL schemas. See <a href="https://tortoise-orm.readthedocs.io/en/latest/migration.html">https://tortoise-orm.readthedocs.io/en/latest/migration.html</a>.</p>
</div>
<h2 id="next-steps">Next steps<a class="headerlink" href="#next-steps" title="Permanent link">&para;</a></h2>
<p>We will now configure an <a href="../../authentication/">authentication method</a>.</p>
<p>We will now configure an <a href="../authentication/index.html">authentication method</a>.</p>
@@ -1098,7 +1098,8 @@
<nav class="md-footer__inner md-grid" aria-label="Footer">
<a href="../mongodb/" class="md-footer__link md-footer__link--prev" rel="prev">
<a href="mongodb.html" class="md-footer__link md-footer__link--prev" aria-label="Previous: MongoDB" rel="prev">
<div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
</div>
@@ -1113,7 +1114,8 @@
</a>
<a href="../ormar/" class="md-footer__link md-footer__link--next" rel="next">
<a href="ormar.html" class="md-footer__link md-footer__link--next" aria-label="Next: Ormar" rel="next">
<div class="md-footer__title">
<div class="md-ellipsis">
<span class="md-footer__direction">
@@ -1148,10 +1150,10 @@
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"base": "../../..", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}, "search": "../../../assets/javascripts/workers/search.d351de03.min.js", "version": null}</script>
<script id="__config" type="application/json">{"base": "../..", "features": [], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "../../assets/javascripts/workers/search.b0710199.min.js", "version": null}</script>
<script src="../../../assets/javascripts/bundle.a1609d9a.min.js"></script>
<script src="../../assets/javascripts/bundle.76f349be.min.js"></script>
</body>