Files
fastapi-users/index.html

1107 lines
41 KiB
HTML

<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="description" content="Ready-to-use and customizable users management for FastAPI">
<link rel="icon" href="favicon.png">
<meta name="generator" content="mkdocs-1.2.1, mkdocs-material-7.1.10">
<title>FastAPI Users</title>
<link rel="stylesheet" href="assets/stylesheets/main.1fe995fd.min.css">
<link rel="stylesheet" href="assets/stylesheets/palette.f1a3b89f.min.css">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono&display=fallback">
<style>:root{--md-text-font-family:"Roboto";--md-code-font-family:"Roboto Mono"}</style>
</head>
<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>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>
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" for="__drawer"></label>
<div data-md-component="skip">
<a href="#fastapi-users" class="md-skip">
Skip to content
</a>
</div>
<div data-md-component="announce">
</div>
<header class="md-header" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<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>
</a>
<label class="md-header__button md-icon" for="__drawer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
FastAPI Users
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
About
</span>
</div>
</div>
</div>
<form class="md-header__option" data-md-component="palette">
<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>
</label>
<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>
</label>
</form>
<label class="md-header__button md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
</label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
<label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
<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>
</label>
<button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
</button>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
Initializing search
</div>
<ol class="md-search-result__list"></ol>
</div>
</div>
</div>
</div>
</div>
<div class="md-header__source">
<a href="https://github.com/frankie567/fastapi-users" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
</div>
<div class="md-source__repository">
frankie567/fastapi-users
</div>
</a>
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<main class="md-main" data-md-component="main">
<div class="md-main__inner md-grid">
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<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>
</a>
FastAPI Users
</label>
<div class="md-nav__source">
<a href="https://github.com/frankie567/fastapi-users" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
</div>
<div class="md-source__repository">
frankie567/fastapi-users
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item md-nav__item--active">
<input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc">
About
<span class="md-nav__icon md-icon"></span>
</label>
<a href="index.html" class="md-nav__link md-nav__link--active">
About
</a>
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#features" class="md-nav__link">
Features
</a>
</li>
<li class="md-nav__item">
<a href="#contributors-and-sponsors" class="md-nav__link">
Contributors and sponsors ✨☕️
</a>
</li>
<li class="md-nav__item">
<a href="#development" class="md-nav__link">
Development
</a>
<nav class="md-nav" aria-label="Development">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#setup-environment" class="md-nav__link">
Setup environment
</a>
</li>
<li class="md-nav__item">
<a href="#run-unit-tests" class="md-nav__link">
Run unit tests
</a>
</li>
<li class="md-nav__item">
<a href="#format-the-code" class="md-nav__link">
Format the code
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#license" class="md-nav__link">
License
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="installation.html" class="md-nav__link">
Installation
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" type="checkbox" id="__nav_3" >
<label class="md-nav__link" for="__nav_3">
Configuration
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" aria-label="Configuration" data-md-level="1">
<label class="md-nav__title" for="__nav_3">
<span class="md-nav__icon md-icon"></span>
Configuration
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="configuration/model.html" class="md-nav__link">
User model
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3_2" type="checkbox" id="__nav_3_2" >
<label class="md-nav__link" for="__nav_3_2">
Databases
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" aria-label="Databases" data-md-level="2">
<label class="md-nav__title" for="__nav_3_2">
<span class="md-nav__icon md-icon"></span>
Databases
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="configuration/databases/sqlalchemy.html" class="md-nav__link">
SQLAlchemy
</a>
</li>
<li class="md-nav__item">
<a href="configuration/databases/mongodb.html" class="md-nav__link">
MongoDB
</a>
</li>
<li class="md-nav__item">
<a href="configuration/databases/tortoise.html" class="md-nav__link">
Tortoise ORM
</a>
</li>
<li class="md-nav__item">
<a href="configuration/databases/ormar.html" class="md-nav__link">
Ormar
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3_3" type="checkbox" id="__nav_3_3" >
<label class="md-nav__link" for="__nav_3_3">
Authentication
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" aria-label="Authentication" data-md-level="2">
<label class="md-nav__title" for="__nav_3_3">
<span class="md-nav__icon md-icon"></span>
Authentication
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="configuration/authentication/index.html" class="md-nav__link">
Introduction
</a>
</li>
<li class="md-nav__item">
<a href="configuration/authentication/jwt.html" class="md-nav__link">
JWT
</a>
</li>
<li class="md-nav__item">
<a href="configuration/authentication/cookie.html" class="md-nav__link">
Cookie
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3_4" type="checkbox" id="__nav_3_4" >
<label class="md-nav__link" for="__nav_3_4">
Routers
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" aria-label="Routers" data-md-level="2">
<label class="md-nav__title" for="__nav_3_4">
<span class="md-nav__icon md-icon"></span>
Routers
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="configuration/routers/index.html" class="md-nav__link">
Introduction
</a>
</li>
<li class="md-nav__item">
<a href="configuration/routers/auth.html" class="md-nav__link">
Auth router
</a>
</li>
<li class="md-nav__item">
<a href="configuration/routers/register.html" class="md-nav__link">
Register routes
</a>
</li>
<li class="md-nav__item">
<a href="configuration/routers/reset.html" class="md-nav__link">
Reset password router
</a>
</li>
<li class="md-nav__item">
<a href="configuration/routers/users.html" class="md-nav__link">
Users router
</a>
</li>
<li class="md-nav__item">
<a href="configuration/routers/verify.html" class="md-nav__link">
Verify router
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="configuration/password-validation.html" class="md-nav__link">
Password validation
</a>
</li>
<li class="md-nav__item">
<a href="configuration/full-example.html" class="md-nav__link">
Full example
</a>
</li>
<li class="md-nav__item">
<a href="configuration/oauth.html" class="md-nav__link">
OAuth2
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_4" type="checkbox" id="__nav_4" >
<label class="md-nav__link" for="__nav_4">
Usage
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" aria-label="Usage" data-md-level="1">
<label class="md-nav__title" for="__nav_4">
<span class="md-nav__icon md-icon"></span>
Usage
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="usage/flow.html" class="md-nav__link">
Flow
</a>
</li>
<li class="md-nav__item">
<a href="usage/routes.html" class="md-nav__link">
Routes
</a>
</li>
<li class="md-nav__item">
<a href="usage/dependency-callables.html" class="md-nav__link">
Dependency callables
</a>
</li>
<li class="md-nav__item">
<a href="usage/helpers.html" class="md-nav__link">
Helpers
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" >
<label class="md-nav__link" for="__nav_5">
Migration
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" aria-label="Migration" data-md-level="1">
<label class="md-nav__title" for="__nav_5">
<span class="md-nav__icon md-icon"></span>
Migration
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="migration/08_to_1x.html" class="md-nav__link">
0.8.x ➡️ 1.x.x
</a>
</li>
<li class="md-nav__item">
<a href="migration/1x_to_2x.html" class="md-nav__link">
1.x.x ➡️ 2.x.x
</a>
</li>
<li class="md-nav__item">
<a href="migration/2x_to_3x.html" class="md-nav__link">
2.x.x ➡️ 3.x.x
</a>
</li>
<li class="md-nav__item">
<a href="migration/3x_to_4x.html" class="md-nav__link">
3.x.x ➡️ 4.x.x
</a>
</li>
<li class="md-nav__item">
<a href="migration/4x_to_5x.html" class="md-nav__link">
4.x.x ➡️ 5.x.x
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#features" class="md-nav__link">
Features
</a>
</li>
<li class="md-nav__item">
<a href="#contributors-and-sponsors" class="md-nav__link">
Contributors and sponsors ✨☕️
</a>
</li>
<li class="md-nav__item">
<a href="#development" class="md-nav__link">
Development
</a>
<nav class="md-nav" aria-label="Development">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#setup-environment" class="md-nav__link">
Setup environment
</a>
</li>
<li class="md-nav__item">
<a href="#run-unit-tests" class="md-nav__link">
Run unit tests
</a>
</li>
<li class="md-nav__item">
<a href="#format-the-code" class="md-nav__link">
Format the code
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#license" class="md-nav__link">
License
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<article class="md-content__inner md-typeset">
<h1 id="fastapi-users">FastAPI Users<a class="headerlink" href="#fastapi-users" title="Permanent link">&para;</a></h1>
<p align="center">
<img src="https://raw.githubusercontent.com/frankie567/fastapi-users/master/logo.svg?sanitize=true" alt="FastAPI Users">
</p>
<p align="center">
<em>Ready-to-use and customizable users management for FastAPI </em>
</p>
<p><a href="https://github.com/frankie567/fastapi-users/actions"><img alt="build" src="https://github.com/frankie567/fastapi-users/workflows/Build/badge.svg" /></a>
<a href="https://codecov.io/gh/frankie567/fastapi-users"><img alt="codecov" src="https://codecov.io/gh/frankie567/fastapi-users/branch/master/graph/badge.svg" /></a>
<a href="https://badge.fury.io/py/fastapi-users"><img alt="PyPI version" src="https://badge.fury.io/py/fastapi-users.svg" /></a>
<a href="https://pepy.tech/project/fastapi-users"><img alt="Downloads" src="https://pepy.tech/badge/fastapi-users" /></a></p>
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<p><a href="#contributors-"><img alt="All Contributors" src="https://img.shields.io/badge/all_contributors-26-orange.svg?style=flat-square" /></a></p>
<!-- ALL-CONTRIBUTORS-BADGE:END -->
<p align="center">
<a href="https://www.buymeacoffee.com/frankie567"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=frankie567&button_colour=FF5F5F&font_colour=ffffff&font_family=Lato&outline_colour=000000&coffee_colour=FFDD00"></a>
</p>
<hr />
<p><strong>Documentation</strong>: <a href="https://frankie567.github.io/fastapi-users/" target="_blank">https://frankie567.github.io/fastapi-users/</a></p>
<p><strong>Source Code</strong>: <a href="https://github.com/frankie567/fastapi-users" target="_blank">https://github.com/frankie567/fastapi-users</a></p>
<hr />
<p>Add quickly a registration and authentication system to your <a href="https://fastapi.tiangolo.com/">FastAPI</a> project. <strong>FastAPI Users</strong> is designed to be as customizable and adaptable as possible.</p>
<h2 id="features">Features<a class="headerlink" href="#features" title="Permanent link">&para;</a></h2>
<ul class="task-list">
<li class="task-list-item"><input type="checkbox" disabled checked/> Extensible base user model</li>
<li class="task-list-item"><input type="checkbox" disabled checked/> Ready-to-use register, login, reset password and verify e-mail routes</li>
<li class="task-list-item"><input type="checkbox" disabled checked/> Ready-to-use social OAuth2 login flow</li>
<li class="task-list-item"><input type="checkbox" disabled checked/> Dependency callables to inject current user in route</li>
<li class="task-list-item"><input type="checkbox" disabled checked/> Pluggable password validation</li>
<li class="task-list-item">
<p><input type="checkbox" disabled checked/> Customizable database backend</p>
<ul class="task-list">
<li class="task-list-item"><input type="checkbox" disabled checked/> SQLAlchemy async backend included thanks to <a href="https://www.encode.io/databases/">encode/databases</a></li>
<li class="task-list-item"><input type="checkbox" disabled checked/> MongoDB async backend included thanks to <a href="https://github.com/mongodb/motor">mongodb/motor</a></li>
<li class="task-list-item"><input type="checkbox" disabled checked/> <a href="https://tortoise-orm.readthedocs.io/en/latest/">Tortoise ORM</a> backend included</li>
<li class="task-list-item"><input type="checkbox" disabled checked/> <a href="https://collerek.github.io/ormar/">ormar</a> backend included</li>
</ul>
</li>
<li class="task-list-item">
<p><input type="checkbox" disabled checked/> Multiple customizable authentication backends</p>
<ul class="task-list">
<li class="task-list-item"><input type="checkbox" disabled checked/> JWT authentication backend included</li>
<li class="task-list-item"><input type="checkbox" disabled checked/> Cookie authentication backend included</li>
</ul>
</li>
<li class="task-list-item"><input type="checkbox" disabled checked/> Full OpenAPI schema support, even with several authentication backends</li>
</ul>
<h2 id="contributors-and-sponsors">Contributors and sponsors ✨☕️<a class="headerlink" href="#contributors-and-sponsors" title="Permanent link">&para;</a></h2>
<p>Thanks goes to these wonderful people (<a href="https://allcontributors.org/docs/en/emoji-key">emoji key</a>):</p>
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="http://francoisvoron.com"><img src="https://avatars.githubusercontent.com/u/1144727?v=4?s=100" width="100px;" alt=""/><br /><sub><b>François Voron</b></sub></a><br /><a href="#maintenance-frankie567" title="Maintenance">🚧</a></td>
<td align="center"><a href="https://github.com/paolodina"><img src="https://avatars.githubusercontent.com/u/1157401?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Paolo Dina</b></sub></a><br /><a href="#financial-paolodina" title="Financial">💵</a> <a href="https://github.com/frankie567/fastapi-users/commits?author=paolodina" title="Code">💻</a></td>
<td align="center"><a href="https://freelancehunt.com/freelancer/slado122.html"><img src="https://avatars.githubusercontent.com/u/46085159?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dmytro Ohorodnik</b></sub></a><br /><a href="https://github.com/frankie567/fastapi-users/issues?q=author%3Aslado122" title="Bug reports">🐛</a></td>
<td align="center"><a href="http://matthewscholefield.github.io"><img src="https://avatars.githubusercontent.com/u/5875019?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Matthew D. Scholefield</b></sub></a><br /><a href="https://github.com/frankie567/fastapi-users/issues?q=author%3AMatthewScholefield" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/roywes"><img src="https://avatars.githubusercontent.com/u/3861579?v=4?s=100" width="100px;" alt=""/><br /><sub><b>roywes</b></sub></a><br /><a href="https://github.com/frankie567/fastapi-users/issues?q=author%3Aroywes" title="Bug reports">🐛</a> <a href="https://github.com/frankie567/fastapi-users/commits?author=roywes" title="Code">💻</a></td>
<td align="center"><a href="https://devwriters.com"><img src="https://avatars.githubusercontent.com/u/10217535?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Satwik Kansal</b></sub></a><br /><a href="https://github.com/frankie567/fastapi-users/commits?author=satwikkansal" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/eddsalkield"><img src="https://avatars.githubusercontent.com/u/30939717?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Edd Salkield</b></sub></a><br /><a href="https://github.com/frankie567/fastapi-users/commits?author=eddsalkield" title="Code">💻</a> <a href="https://github.com/frankie567/fastapi-users/commits?author=eddsalkield" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/mark-todd"><img src="https://avatars.githubusercontent.com/u/60781787?v=4?s=100" width="100px;" alt=""/><br /><sub><b>mark-todd</b></sub></a><br /><a href="https://github.com/frankie567/fastapi-users/commits?author=mark-todd" title="Code">💻</a> <a href="https://github.com/frankie567/fastapi-users/commits?author=mark-todd" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/lill74"><img src="https://avatars.githubusercontent.com/u/12353597?v=4?s=100" width="100px;" alt=""/><br /><sub><b>lill74</b></sub></a><br /><a href="https://github.com/frankie567/fastapi-users/issues?q=author%3Alill74" title="Bug reports">🐛</a> <a href="https://github.com/frankie567/fastapi-users/commits?author=lill74" title="Code">💻</a> <a href="https://github.com/frankie567/fastapi-users/commits?author=lill74" title="Documentation">📖</a></td>
<td align="center"><a href="https://yacht.sh"><img src="https://avatars.githubusercontent.com/u/66331933?v=4?s=100" width="100px;" alt=""/><br /><sub><b>SelfhostedPro</b></sub></a><br /><a href="#security-SelfhostedPro" title="Security">🛡️</a> <a href="https://github.com/frankie567/fastapi-users/commits?author=SelfhostedPro" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/oskar-gmerek"><img src="https://avatars.githubusercontent.com/u/53402105?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Oskar Gmerek</b></sub></a><br /><a href="https://github.com/frankie567/fastapi-users/commits?author=oskar-gmerek" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/mcolladoio"><img src="https://avatars.githubusercontent.com/u/61695048?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Martin Collado</b></sub></a><br /><a href="https://github.com/frankie567/fastapi-users/issues?q=author%3Amcolladoio" title="Bug reports">🐛</a> <a href="https://github.com/frankie567/fastapi-users/commits?author=mcolladoio" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/nullhack"><img src="https://avatars.githubusercontent.com/u/11466701?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Eric Lopes</b></sub></a><br /><a href="https://github.com/frankie567/fastapi-users/commits?author=nullhack" title="Documentation">📖</a> <a href="#security-nullhack" title="Security">🛡️</a></td>
<td align="center"><a href="https://github.com/rnd42"><img src="https://avatars.githubusercontent.com/u/618839?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Beau Breon</b></sub></a><br /><a href="https://github.com/frankie567/fastapi-users/commits?author=rnd42" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/niazangels"><img src="https://avatars.githubusercontent.com/u/2761491?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Niyas Mohammed</b></sub></a><br /><a href="https://github.com/frankie567/fastapi-users/commits?author=niazangels" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/prostomarkeloff"><img src="https://avatars.githubusercontent.com/u/28061158?v=4?s=100" width="100px;" alt=""/><br /><sub><b>prostomarkeloff</b></sub></a><br /><a href="https://github.com/frankie567/fastapi-users/commits?author=prostomarkeloff" title="Documentation">📖</a> <a href="https://github.com/frankie567/fastapi-users/commits?author=prostomarkeloff" title="Code">💻</a></td>
<td align="center"><a href="https://www.linkedin.com/in/mariusmezerette/"><img src="https://avatars.githubusercontent.com/u/952685?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Marius Mézerette</b></sub></a><br /><a href="https://github.com/frankie567/fastapi-users/issues?q=author%3AMariusMez" title="Bug reports">🐛</a> <a href="#ideas-MariusMez" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/grigi"><img src="https://avatars.githubusercontent.com/u/1309160?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nickolas Grigoriadis</b></sub></a><br /><a href="https://github.com/frankie567/fastapi-users/issues?q=author%3Agrigi" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://opendatacoder.me"><img src="https://avatars.githubusercontent.com/u/7386680?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Open Data Coder</b></sub></a><br /><a href="#ideas-p3t3r67x0" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://www.dralshehri.com/"><img src="https://avatars.githubusercontent.com/u/542855?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mohammed Alshehri</b></sub></a><br /><a href="#ideas-dralshehri" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://www.linkedin.com/in/lefnire/"><img src="https://avatars.githubusercontent.com/u/195202?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tyler Renelle</b></sub></a><br /><a href="#ideas-lefnire" title="Ideas, Planning, & Feedback">🤔</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/collerek"><img src="https://avatars.githubusercontent.com/u/16324238?v=4?s=100" width="100px;" alt=""/><br /><sub><b>collerek</b></sub></a><br /><a href="https://github.com/frankie567/fastapi-users/commits?author=collerek" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/rbracco"><img src="https://avatars.githubusercontent.com/u/47190785?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Robert Bracco</b></sub></a><br /><a href="#financial-rbracco" title="Financial">💵</a></td>
<td align="center"><a href="https://herrmann.tech"><img src="https://avatars.githubusercontent.com/u/1058414?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Augusto Herrmann</b></sub></a><br /><a href="https://github.com/frankie567/fastapi-users/commits?author=augusto-herrmann" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/Smithybrewer"><img src="https://avatars.githubusercontent.com/u/57669591?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Smithybrewer</b></sub></a><br /><a href="https://github.com/frankie567/fastapi-users/issues?q=author%3ASmithybrewer" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/silllli"><img src="https://avatars.githubusercontent.com/u/9334305?v=4?s=100" width="100px;" alt=""/><br /><sub><b>silllli</b></sub></a><br /><a href="https://github.com/frankie567/fastapi-users/commits?author=silllli" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/alexferrari88"><img src="https://avatars.githubusercontent.com/u/49028826?v=4?s=100" width="100px;" alt=""/><br /><sub><b>alexferrari88</b></sub></a><br /><a href="#financial-alexferrari88" title="Financial">💵</a></td>
<td align="center"><a href="https://github.com/sandalwoodbox"><img src="https://avatars.githubusercontent.com/u/80227316?v=4?s=100" width="100px;" alt=""/><br /><sub><b>sandalwoodbox</b></sub></a><br /><a href="https://github.com/frankie567/fastapi-users/issues?q=author%3Asandalwoodbox" title="Bug reports">🐛</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/vladhoi"><img src="https://avatars.githubusercontent.com/u/33840957?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vlad Hoi</b></sub></a><br /><a href="https://github.com/frankie567/fastapi-users/commits?author=vladhoi" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/jnu"><img src="https://avatars.githubusercontent.com/u/1069899?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Joe Nudell</b></sub></a><br /><a href="https://github.com/frankie567/fastapi-users/issues?q=author%3Ajnu" title="Bug reports">🐛</a></td>
</tr>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
<p>This project follows the <a href="https://github.com/all-contributors/all-contributors">all-contributors</a> specification. Contributions of any kind welcome!</p>
<h2 id="development">Development<a class="headerlink" href="#development" title="Permanent link">&para;</a></h2>
<h3 id="setup-environment">Setup environment<a class="headerlink" href="#setup-environment" title="Permanent link">&para;</a></h3>
<p>You should create a virtual environment and activate it:</p>
<div class="highlight"><pre><span></span><code>python -m venv venv/
</code></pre></div>
<div class="highlight"><pre><span></span><code><span class="nb">source</span> venv/bin/activate
</code></pre></div>
<p>And then install the development dependencies:</p>
<div class="highlight"><pre><span></span><code>pip install -r requirements.dev.txt
</code></pre></div>
<h3 id="run-unit-tests">Run unit tests<a class="headerlink" href="#run-unit-tests" title="Permanent link">&para;</a></h3>
<p>You can run all the tests with:</p>
<div class="highlight"><pre><span></span><code>make <span class="nb">test</span>
</code></pre></div>
<p>The command will start a MongoDB container for the related unit tests. So you should have <a href="https://www.docker.com/get-started">Docker</a> installed.</p>
<p>Alternatively, you can run <code>pytest</code> yourself. The MongoDB unit tests will be skipped if no server is available on your local machine:</p>
<div class="highlight"><pre><span></span><code>pytest
</code></pre></div>
<p>There are quite a few unit tests, so you might run into ulimit issues where there are too many open file descriptors. You may be able to set a new, higher limit temporarily with:</p>
<div class="highlight"><pre><span></span><code><span class="nb">ulimit</span> -n <span class="m">2048</span>
</code></pre></div>
<h3 id="format-the-code">Format the code<a class="headerlink" href="#format-the-code" title="Permanent link">&para;</a></h3>
<p>Execute the following command to apply <code>isort</code> and <code>black</code> formatting:</p>
<div class="highlight"><pre><span></span><code>make format
</code></pre></div>
<h2 id="license">License<a class="headerlink" href="#license" title="Permanent link">&para;</a></h2>
<p>This project is licensed under the terms of the MIT license.</p>
</article>
</div>
</div>
</main>
<footer class="md-footer">
<nav class="md-footer__inner md-grid" aria-label="Footer">
<a href="installation.html" class="md-footer__link md-footer__link--next" aria-label="Next: Installation" rel="next">
<div class="md-footer__title">
<div class="md-ellipsis">
<span class="md-footer__direction">
Next
</span>
Installation
</div>
</div>
<div class="md-footer__button md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg>
</div>
</a>
</nav>
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
</div>
</div>
</div>
</footer>
</div>
<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", "select.version.title": "Select version"}, "search": "assets/javascripts/workers/search.477d984a.min.js", "version": null}</script>
<script src="assets/javascripts/bundle.ddd52ceb.min.js"></script>
</body>
</html>