mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2025-08-15 11:11:16 +08:00
698 lines
41 KiB
HTML
698 lines
41 KiB
HTML
|
|
<!DOCTYPE html>
|
|
|
|
<html class="no-js" lang="en">
|
|
<head>
|
|
<meta charset="utf-8"/>
|
|
<meta content="width=device-width,initial-scale=1" name="viewport"/>
|
|
<meta content="Ready-to-use and customizable users management for FastAPI" name="description"/>
|
|
<link href="favicon.png" rel="icon"/>
|
|
<meta content="mkdocs-1.2.2, mkdocs-material-7.2.7" name="generator"/>
|
|
<title>FastAPI Users</title>
|
|
<link href="assets/stylesheets/main.3c7cdd75.min.css" rel="stylesheet"/>
|
|
<link href="assets/stylesheets/palette.3f5d1f46.min.css" rel="stylesheet"/>
|
|
<link crossorigin="" href="https://fonts.gstatic.com" rel="preconnect"/>
|
|
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono&display=fallback" rel="stylesheet"/>
|
|
<style>:root{--md-text-font-family:"Roboto";--md-code-font-family:"Roboto Mono"}</style>
|
|
</head>
|
|
<body data-md-color-accent="red" data-md-color-primary="red" data-md-color-scheme="default" dir="ltr">
|
|
<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 autocomplete="off" class="md-toggle" data-md-toggle="drawer" id="__drawer" type="checkbox"/>
|
|
<input autocomplete="off" class="md-toggle" data-md-toggle="search" id="__search" type="checkbox"/>
|
|
<label class="md-overlay" for="__drawer"></label>
|
|
<div data-md-component="skip">
|
|
<a class="md-skip" href="#fastapi-users">
|
|
Skip to content
|
|
</a>
|
|
</div>
|
|
<div data-md-component="announce">
|
|
</div>
|
|
<header class="md-header" data-md-component="header">
|
|
<nav aria-label="Header" class="md-header__inner md-grid">
|
|
<a aria-label="FastAPI Users" class="md-header__button md-logo" data-md-component="logo" href="." title="FastAPI Users">
|
|
<svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><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"></path></svg>
|
|
</a>
|
|
<label class="md-header__button md-icon" for="__drawer">
|
|
<svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"></path></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 aria-label="Switch to dark mode" class="md-option" data-md-color-accent="red" data-md-color-media="" data-md-color-primary="red" data-md-color-scheme="default" id="__palette_1" name="__palette" type="radio"/>
|
|
<label class="md-header__button md-icon" for="__palette_2" hidden="" title="Switch to dark mode">
|
|
<svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><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"></path></svg>
|
|
</label>
|
|
<input aria-label="Switch to light mode" class="md-option" data-md-color-accent="red" data-md-color-media="" data-md-color-primary="red" data-md-color-scheme="slate" id="__palette_2" name="__palette" type="radio"/>
|
|
<label class="md-header__button md-icon" for="__palette_1" hidden="" title="Switch to light mode">
|
|
<svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><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"></path></svg>
|
|
</label>
|
|
</form>
|
|
<label class="md-header__button md-icon" for="__search">
|
|
<svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><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"></path></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 aria-label="Search" autocapitalize="off" autocomplete="off" autocorrect="off" class="md-search__input" data-md-component="search-query" name="query" placeholder="Search" required="" spellcheck="false" type="text"/>
|
|
<label class="md-search__icon md-icon" for="__search">
|
|
<svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><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"></path></svg>
|
|
<svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"></path></svg>
|
|
</label>
|
|
<nav aria-label="Search" class="md-search__options">
|
|
<button aria-label="Clear" class="md-search__icon md-icon" tabindex="-1" type="reset">
|
|
<svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><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"></path></svg>
|
|
</button>
|
|
</nav>
|
|
</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 class="md-source" data-md-component="source" href="https://github.com/fastapi-users/fastapi-users" title="Go to repository">
|
|
<div class="md-source__icon md-icon">
|
|
<svg viewbox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><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"></path></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 aria-label="Navigation" class="md-nav md-nav--primary" data-md-level="0">
|
|
<label class="md-nav__title" for="__drawer">
|
|
<a aria-label="FastAPI Users" class="md-nav__button md-logo" data-md-component="logo" href="." title="FastAPI Users">
|
|
<svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><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"></path></svg>
|
|
</a>
|
|
FastAPI Users
|
|
</label>
|
|
<div class="md-nav__source">
|
|
<a class="md-source" data-md-component="source" href="https://github.com/fastapi-users/fastapi-users" title="Go to repository">
|
|
<div class="md-source__icon md-icon">
|
|
<svg viewbox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><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"></path></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" id="__toc" type="checkbox"/>
|
|
<label class="md-nav__link md-nav__link--active" for="__toc">
|
|
About
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
<a class="md-nav__link md-nav__link--active" href=".">
|
|
About
|
|
</a>
|
|
<nav aria-label="Table of contents" class="md-nav md-nav--secondary">
|
|
<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 class="md-nav__link" href="#features">
|
|
Features
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="#discover-my-book-building-data-science-applications-with-fastapi">
|
|
📚 Discover my book: Building Data Science Applications with FastAPI
|
|
</a>
|
|
<nav aria-label="📚 Discover my book: Building Data Science Applications with FastAPI" class="md-nav">
|
|
<ul class="md-nav__list">
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="#what-is-this-book-about">
|
|
What is this book about?
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="#contributors-and-sponsors">
|
|
Contributors and sponsors ✨☕️
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="#development">
|
|
Development
|
|
</a>
|
|
<nav aria-label="Development" class="md-nav">
|
|
<ul class="md-nav__list">
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="#setup-environment">
|
|
Setup environment
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="#run-unit-tests">
|
|
Run unit tests
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="#format-the-code">
|
|
Format the code
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="#license">
|
|
License
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="installation/">
|
|
Installation
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3" id="__nav_3" type="checkbox"/>
|
|
<label class="md-nav__link" for="__nav_3">
|
|
Configuration
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
<nav aria-label="Configuration" class="md-nav" 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 class="md-nav__link" href="configuration/overview/">
|
|
Overview
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="configuration/models/">
|
|
Models
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3_3" id="__nav_3_3" type="checkbox"/>
|
|
<label class="md-nav__link" for="__nav_3_3">
|
|
Database adapters
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
<nav aria-label="Database adapters" class="md-nav" data-md-level="2">
|
|
<label class="md-nav__title" for="__nav_3_3">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Database adapters
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix="">
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="configuration/databases/sqlalchemy/">
|
|
SQLAlchemy
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="configuration/databases/mongodb/">
|
|
MongoDB
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="configuration/databases/tortoise/">
|
|
Tortoise ORM
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="configuration/databases/ormar/">
|
|
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_4" id="__nav_3_4" type="checkbox"/>
|
|
<label class="md-nav__link" for="__nav_3_4">
|
|
Authentication backends
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
<nav aria-label="Authentication backends" class="md-nav" data-md-level="2">
|
|
<label class="md-nav__title" for="__nav_3_4">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Authentication backends
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix="">
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="configuration/authentication/">
|
|
Introduction
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="configuration/authentication/jwt/">
|
|
JWT
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="configuration/authentication/cookie/">
|
|
Cookie
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="configuration/user-manager/">
|
|
UserManager
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_3_6" id="__nav_3_6" type="checkbox"/>
|
|
<label class="md-nav__link" for="__nav_3_6">
|
|
Routers
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
<nav aria-label="Routers" class="md-nav" data-md-level="2">
|
|
<label class="md-nav__title" for="__nav_3_6">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Routers
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix="">
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="configuration/routers/">
|
|
Introduction
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="configuration/routers/auth/">
|
|
Auth router
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="configuration/routers/register/">
|
|
Register routes
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="configuration/routers/verify/">
|
|
Verify router
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="configuration/routers/reset/">
|
|
Reset password router
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="configuration/routers/users/">
|
|
Users router
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="configuration/full-example/">
|
|
Full example
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="configuration/oauth/">
|
|
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" id="__nav_4" type="checkbox"/>
|
|
<label class="md-nav__link" for="__nav_4">
|
|
Usage
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
<nav aria-label="Usage" class="md-nav" 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 class="md-nav__link" href="usage/flow/">
|
|
Flow
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="usage/routes/">
|
|
Routes
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="usage/current-user/">
|
|
Get current user
|
|
</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" id="__nav_5" type="checkbox"/>
|
|
<label class="md-nav__link" for="__nav_5">
|
|
Migration
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
<nav aria-label="Migration" class="md-nav" 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 class="md-nav__link" href="migration/08_to_1x/">
|
|
0.8.x ➡️ 1.x.x
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="migration/1x_to_2x/">
|
|
1.x.x ➡️ 2.x.x
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="migration/2x_to_3x/">
|
|
2.x.x ➡️ 3.x.x
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="migration/3x_to_4x/">
|
|
3.x.x ➡️ 4.x.x
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="migration/4x_to_5x/">
|
|
4.x.x ➡️ 5.x.x
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="migration/6x_to_7x/">
|
|
6.x.x ➡️ 7.x.x
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="migration/7x_to_8x/">
|
|
7.x.x ➡️ 8.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 aria-label="Table of contents" class="md-nav md-nav--secondary">
|
|
<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 class="md-nav__link" href="#features">
|
|
Features
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="#discover-my-book-building-data-science-applications-with-fastapi">
|
|
📚 Discover my book: Building Data Science Applications with FastAPI
|
|
</a>
|
|
<nav aria-label="📚 Discover my book: Building Data Science Applications with FastAPI" class="md-nav">
|
|
<ul class="md-nav__list">
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="#what-is-this-book-about">
|
|
What is this book about?
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="#contributors-and-sponsors">
|
|
Contributors and sponsors ✨☕️
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="#development">
|
|
Development
|
|
</a>
|
|
<nav aria-label="Development" class="md-nav">
|
|
<ul class="md-nav__list">
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="#setup-environment">
|
|
Setup environment
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="#run-unit-tests">
|
|
Run unit tests
|
|
</a>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="#format-the-code">
|
|
Format the code
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</li>
|
|
<li class="md-nav__item">
|
|
<a class="md-nav__link" href="#license">
|
|
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">¶</a></h1>
|
|
<p align="center">
|
|
<img alt="FastAPI Users" src="https://raw.githubusercontent.com/fastapi-users/fastapi-users/master/logo.svg?sanitize=true"/>
|
|
</p>
|
|
<p align="center">
|
|
<em>Ready-to-use and customizable users management for FastAPI </em>
|
|
</p>
|
|
<p><a href="https://github.com/fastapi-users/fastapi-users/actions"><img alt="build" src="https://github.com/fastapi-users/fastapi-users/workflows/Build/badge.svg"/></a>
|
|
<a href="https://codecov.io/gh/fastapi-users/fastapi-users"><img alt="codecov" src="https://codecov.io/gh/fastapi-users/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-36-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://fastapi-users.github.io/fastapi-users/" target="_blank">https://fastapi-users.github.io/fastapi-users/</a></p>
|
|
<p><strong>Source Code</strong>: <a href="https://github.com/fastapi-users/fastapi-users" target="_blank">https://github.com/fastapi-users/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">¶</a></h2>
|
|
<ul class="task-list">
|
|
<li class="task-list-item"><input checked="" disabled="" type="checkbox"> Extensible base user model</input></li>
|
|
<li class="task-list-item"><input checked="" disabled="" type="checkbox"> Ready-to-use register, login, reset password and verify e-mail routes</input></li>
|
|
<li class="task-list-item"><input checked="" disabled="" type="checkbox"> Ready-to-use social OAuth2 login flow</input></li>
|
|
<li class="task-list-item"><input checked="" disabled="" type="checkbox"> Dependency callables to inject current user in route</input></li>
|
|
<li class="task-list-item"><input checked="" disabled="" type="checkbox"> Pluggable password validation</input></li>
|
|
<li class="task-list-item">
|
|
<p><input checked="" disabled="" type="checkbox"> Customizable database backend</input></p>
|
|
<ul class="task-list">
|
|
<li class="task-list-item"><input checked="" disabled="" type="checkbox"> SQLAlchemy async backend included thanks to <a href="https://www.encode.io/databases/">encode/databases</a></input></li>
|
|
<li class="task-list-item"><input checked="" disabled="" type="checkbox"> MongoDB async backend included thanks to <a href="https://github.com/mongodb/motor">mongodb/motor</a></input></li>
|
|
<li class="task-list-item"><input checked="" disabled="" type="checkbox"> <a href="https://tortoise-orm.readthedocs.io/en/latest/">Tortoise ORM</a> backend included</input></li>
|
|
<li class="task-list-item"><input checked="" disabled="" type="checkbox"> <a href="https://collerek.github.io/ormar/">ormar</a> backend included</input></li>
|
|
</ul>
|
|
</li>
|
|
<li class="task-list-item">
|
|
<p><input checked="" disabled="" type="checkbox"> Multiple customizable authentication backends</input></p>
|
|
<ul class="task-list">
|
|
<li class="task-list-item"><input checked="" disabled="" type="checkbox"> JWT authentication backend included</input></li>
|
|
<li class="task-list-item"><input checked="" disabled="" type="checkbox"/> Cookie authentication backend included</li>
|
|
</ul>
|
|
</li>
|
|
<li class="task-list-item"><input checked="" disabled="" type="checkbox"/> Full OpenAPI schema support, even with several authentication backends</li>
|
|
</ul>
|
|
<h2 id="discover-my-book-building-data-science-applications-with-fastapi">📚 Discover my book: <em>Building Data Science Applications with FastAPI</em><a class="headerlink" href="#discover-my-book-building-data-science-applications-with-fastapi" title="Permanent link">¶</a></h2>
|
|
<p><img align="right" alt="Building Data Science Applications with FastAPI" height="256px" src="https://static.packt-cdn.com/products/9781801079211/cover/smaller"/></p>
|
|
<p><strong>Develop, manage, and deploy efficient machine learning applications with Python</strong></p>
|
|
<h3 id="what-is-this-book-about">What is this book about?<a class="headerlink" href="#what-is-this-book-about" title="Permanent link">¶</a></h3>
|
|
<p>This book covers the following exciting features:</p>
|
|
<ul>
|
|
<li>Explore the basics of modern Python and async I/O programming</li>
|
|
<li>Get to grips with basic and advanced concepts of the FastAPI framework</li>
|
|
<li>Implement a FastAPI dependency to efficiently run a machine learning model</li>
|
|
<li>Integrate a simple face detection algorithm in a FastAPI backend</li>
|
|
<li>Integrate common Python data science libraries in a web backend</li>
|
|
<li>Deploy a performant and reliable web backend for a data science application</li>
|
|
</ul>
|
|
<p>If you feel this book is for you, get your <a href="https://amzn.to/3kTvgjG">copy</a> today!</p>
|
|
<h2 id="contributors-and-sponsors">Contributors and sponsors ✨☕️<a class="headerlink" href="#contributors-and-sponsors" title="Permanent link">¶</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 alt="" src="https://avatars.githubusercontent.com/u/1144727?v=4?s=100" width="100px;"><br/><sub><b>François Voron</b></sub></img></a><br/><a href="#maintenance-frankie567" title="Maintenance">🚧</a></td>
|
|
<td align="center"><a href="https://github.com/paolodina"><img alt="" src="https://avatars.githubusercontent.com/u/1157401?v=4?s=100" width="100px;"><br/><sub><b>Paolo Dina</b></sub></img></a><br/><a href="#financial-paolodina" title="Financial">💵</a> <a href="https://github.com/fastapi-users/fastapi-users/commits?author=paolodina" title="Code">💻</a></td>
|
|
<td align="center"><a href="https://freelancehunt.com/freelancer/slado122.html"><img alt="" src="https://avatars.githubusercontent.com/u/46085159?v=4?s=100" width="100px;"/><br/><sub><b>Dmytro Ohorodnik</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/issues?q=author%3Aslado122" title="Bug reports">🐛</a></td>
|
|
<td align="center"><a href="http://matthewscholefield.github.io"><img alt="" src="https://avatars.githubusercontent.com/u/5875019?v=4?s=100" width="100px;"/><br/><sub><b>Matthew D. Scholefield</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/issues?q=author%3AMatthewScholefield" title="Bug reports">🐛</a></td>
|
|
<td align="center"><a href="https://github.com/roywes"><img alt="" src="https://avatars.githubusercontent.com/u/3861579?v=4?s=100" width="100px;"/><br/><sub><b>roywes</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/issues?q=author%3Aroywes" title="Bug reports">🐛</a> <a href="https://github.com/fastapi-users/fastapi-users/commits?author=roywes" title="Code">💻</a></td>
|
|
<td align="center"><a href="https://devwriters.com"><img alt="" src="https://avatars.githubusercontent.com/u/10217535?v=4?s=100" width="100px;"/><br/><sub><b>Satwik Kansal</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/commits?author=satwikkansal" title="Documentation">📖</a></td>
|
|
<td align="center"><a href="https://github.com/eddsalkield"><img alt="" src="https://avatars.githubusercontent.com/u/30939717?v=4?s=100" width="100px;"/><br/><sub><b>Edd Salkield</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/commits?author=eddsalkield" title="Code">💻</a> <a href="https://github.com/fastapi-users/fastapi-users/commits?author=eddsalkield" title="Documentation">📖</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center"><a href="https://github.com/mark-todd"><img alt="" src="https://avatars.githubusercontent.com/u/60781787?v=4?s=100" width="100px;"/><br/><sub><b>mark-todd</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/commits?author=mark-todd" title="Code">💻</a> <a href="https://github.com/fastapi-users/fastapi-users/commits?author=mark-todd" title="Documentation">📖</a></td>
|
|
<td align="center"><a href="https://github.com/lill74"><img alt="" src="https://avatars.githubusercontent.com/u/12353597?v=4?s=100" width="100px;"/><br/><sub><b>lill74</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/issues?q=author%3Alill74" title="Bug reports">🐛</a> <a href="https://github.com/fastapi-users/fastapi-users/commits?author=lill74" title="Code">💻</a> <a href="https://github.com/fastapi-users/fastapi-users/commits?author=lill74" title="Documentation">📖</a></td>
|
|
<td align="center"><a href="https://yacht.sh"><img alt="" src="https://avatars.githubusercontent.com/u/66331933?v=4?s=100" width="100px;"/><br/><sub><b>SelfhostedPro</b></sub></a><br/><a href="#security-SelfhostedPro" title="Security">🛡️</a> <a href="https://github.com/fastapi-users/fastapi-users/commits?author=SelfhostedPro" title="Code">💻</a></td>
|
|
<td align="center"><a href="https://github.com/oskar-gmerek"><img alt="" src="https://avatars.githubusercontent.com/u/53402105?v=4?s=100" width="100px;"/><br/><sub><b>Oskar Gmerek</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/commits?author=oskar-gmerek" title="Documentation">📖</a></td>
|
|
<td align="center"><a href="https://github.com/mcolladoio"><img alt="" src="https://avatars.githubusercontent.com/u/61695048?v=4?s=100" width="100px;"/><br/><sub><b>Martin Collado</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/issues?q=author%3Amcolladoio" title="Bug reports">🐛</a> <a href="https://github.com/fastapi-users/fastapi-users/commits?author=mcolladoio" title="Code">💻</a></td>
|
|
<td align="center"><a href="https://github.com/nullhack"><img alt="" src="https://avatars.githubusercontent.com/u/11466701?v=4?s=100" width="100px;"/><br/><sub><b>Eric Lopes</b></sub></a><br/><a href="https://github.com/fastapi-users/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 alt="" src="https://avatars.githubusercontent.com/u/618839?v=4?s=100" width="100px;"/><br/><sub><b>Beau Breon</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/commits?author=rnd42" title="Code">💻</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center"><a href="https://github.com/niazangels"><img alt="" src="https://avatars.githubusercontent.com/u/2761491?v=4?s=100" width="100px;"/><br/><sub><b>Niyas Mohammed</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/commits?author=niazangels" title="Documentation">📖</a></td>
|
|
<td align="center"><a href="https://github.com/prostomarkeloff"><img alt="" src="https://avatars.githubusercontent.com/u/28061158?v=4?s=100" width="100px;"/><br/><sub><b>prostomarkeloff</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/commits?author=prostomarkeloff" title="Documentation">📖</a> <a href="https://github.com/fastapi-users/fastapi-users/commits?author=prostomarkeloff" title="Code">💻</a></td>
|
|
<td align="center"><a href="https://www.linkedin.com/in/mariusmezerette/"><img alt="" src="https://avatars.githubusercontent.com/u/952685?v=4?s=100" width="100px;"/><br/><sub><b>Marius Mézerette</b></sub></a><br/><a href="https://github.com/fastapi-users/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 alt="" src="https://avatars.githubusercontent.com/u/1309160?v=4?s=100" width="100px;"/><br/><sub><b>Nickolas Grigoriadis</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/issues?q=author%3Agrigi" title="Bug reports">🐛</a></td>
|
|
<td align="center"><a href="https://opendatacoder.me"><img alt="" src="https://avatars.githubusercontent.com/u/7386680?v=4?s=100" width="100px;"/><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 alt="" src="https://avatars.githubusercontent.com/u/542855?v=4?s=100" width="100px;"/><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 alt="" src="https://avatars.githubusercontent.com/u/195202?v=4?s=100" width="100px;"/><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 alt="" src="https://avatars.githubusercontent.com/u/16324238?v=4?s=100" width="100px;"/><br/><sub><b>collerek</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/commits?author=collerek" title="Code">💻</a></td>
|
|
<td align="center"><a href="https://github.com/rbracco"><img alt="" src="https://avatars.githubusercontent.com/u/47190785?v=4?s=100" width="100px;"/><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 alt="" src="https://avatars.githubusercontent.com/u/1058414?v=4?s=100" width="100px;"/><br/><sub><b>Augusto Herrmann</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/commits?author=augusto-herrmann" title="Documentation">📖</a></td>
|
|
<td align="center"><a href="https://github.com/Smithybrewer"><img alt="" src="https://avatars.githubusercontent.com/u/57669591?v=4?s=100" width="100px;"/><br/><sub><b>Smithybrewer</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/issues?q=author%3ASmithybrewer" title="Bug reports">🐛</a></td>
|
|
<td align="center"><a href="https://github.com/silllli"><img alt="" src="https://avatars.githubusercontent.com/u/9334305?v=4?s=100" width="100px;"/><br/><sub><b>silllli</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/commits?author=silllli" title="Documentation">📖</a></td>
|
|
<td align="center"><a href="https://github.com/alexferrari88"><img alt="" src="https://avatars.githubusercontent.com/u/49028826?v=4?s=100" width="100px;"/><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 alt="" src="https://avatars.githubusercontent.com/u/80227316?v=4?s=100" width="100px;"/><br/><sub><b>sandalwoodbox</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/issues?q=author%3Asandalwoodbox" title="Bug reports">🐛</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center"><a href="https://github.com/vladhoi"><img alt="" src="https://avatars.githubusercontent.com/u/33840957?v=4?s=100" width="100px;"/><br/><sub><b>Vlad Hoi</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/commits?author=vladhoi" title="Documentation">📖</a></td>
|
|
<td align="center"><a href="https://github.com/jnu"><img alt="" src="https://avatars.githubusercontent.com/u/1069899?v=4?s=100" width="100px;"/><br/><sub><b>Joe Nudell</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/issues?q=author%3Ajnu" title="Bug reports">🐛</a></td>
|
|
<td align="center"><a href="https://github.com/cosmosquark"><img alt="" src="https://avatars.githubusercontent.com/u/1540682?v=4?s=100" width="100px;"/><br/><sub><b>Ben</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/commits?author=cosmosquark" title="Code">💻</a></td>
|
|
<td align="center"><a href="https://github.com/BoYanZh"><img alt="" src="https://avatars.githubusercontent.com/u/32470225?v=4?s=100" width="100px;"/><br/><sub><b>BoYanZh</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/commits?author=BoYanZh" title="Documentation">📖</a></td>
|
|
<td align="center"><a href="https://github.com/davidbrochart"><img alt="" src="https://avatars.githubusercontent.com/u/4711805?v=4?s=100" width="100px;"/><br/><sub><b>David Brochart</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/commits?author=davidbrochart" title="Documentation">📖</a></td>
|
|
<td align="center"><a href="https://www.daanbeverdam.com"><img alt="" src="https://avatars.githubusercontent.com/u/13944585?v=4?s=100" width="100px;"/><br/><sub><b>Daan Beverdam</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/commits?author=daanbeverdam" title="Code">💻</a></td>
|
|
<td align="center"><a href="http://sralab.com"><img alt="" src="https://avatars.githubusercontent.com/u/1815?v=4?s=100" width="100px;"/><br/><sub><b>Stéphane Raimbault</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/commits?author=stephane" title="Tests">⚠️</a> <a href="https://github.com/fastapi-users/fastapi-users/issues?q=author%3Astephane" title="Bug reports">🐛</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center"><a href="https://github.com/sondrelg"><img alt="" src="https://avatars.githubusercontent.com/u/25310870?v=4?s=100" width="100px;"/><br/><sub><b>Sondre Lillebø Gundersen</b></sub></a><br/><a href="https://github.com/fastapi-users/fastapi-users/commits?author=sondrelg" title="Documentation">📖</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">¶</a></h2>
|
|
<h3 id="setup-environment">Setup environment<a class="headerlink" href="#setup-environment" title="Permanent link">¶</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">¶</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">¶</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">¶</a></h2>
|
|
<p>This project is licensed under the terms of the MIT license.</p>
|
|
</article>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
<footer class="md-footer">
|
|
<nav aria-label="Footer" class="md-footer__inner md-grid">
|
|
<a aria-label="Next: Installation" class="md-footer__link md-footer__link--next" href="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 viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"></path></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/" rel="noopener" target="_blank">
|
|
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.94ec81fe.min.js", "version": null}</script>
|
|
<script src="assets/javascripts/bundle.48dfec6c.min.js"></script>
|
|
<script src="https://unpkg.com/mermaid/dist/mermaid.min.js"></script>
|
|
</body>
|
|
</html> |