Metadata-Version: 2.1
Name: fastapi-users
Version: 3.0.4
Summary: Ready-to-use and customizable users management for FastAPI.
Home-page: https://github.com/frankie567/fastapi-users
License: UNKNOWN
Author: François Voron
Author-email: fvoron@gmail.com
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Classifier: License :: OSI Approved :: MIT License
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Internet :: WWW/HTTP :: Session
Requires-Dist: fastapi >=0.54.0,<0.62.0
Requires-Dist: passlib[bcrypt] ==1.7.2
Requires-Dist: email-validator >=1.1.0,<1.2
Requires-Dist: pyjwt ==1.7.1
Requires-Dist: python-multipart ==0.0.5
Requires-Dist: makefun >=1.9.2,<1.10
Requires-Dist: motor ==2.1.0 ; extra == "mongodb"
Requires-Dist: httpx-oauth >=0.3,<0.4 ; extra == "oauth"
Requires-Dist: sqlalchemy >=1.3.13,<1.4 ; extra == "sqlalchemy"
Requires-Dist: databases >=0.3.0,<0.4 ; extra == "sqlalchemy"
Requires-Dist: tortoise-orm >=0.16.0,<0.17.0 ; extra == "tortoise-orm"
Project-URL: Documentation, https://frankie567.github.io/fastapi-users/
Provides-Extra: mongodb
Provides-Extra: oauth
Provides-Extra: sqlalchemy
Provides-Extra: tortoise-orm

# FastAPI Users

<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>

[![build](https://github.com/frankie567/fastapi-users/workflows/Build/badge.svg)](https://github.com/frankie567/fastapi-users/actions)
[![codecov](https://codecov.io/gh/frankie567/fastapi-users/branch/master/graph/badge.svg)](https://codecov.io/gh/frankie567/fastapi-users)
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=frankie567/fastapi-users)](https://dependabot.com)
[![PyPI version](https://badge.fury.io/py/fastapi-users.svg)](https://badge.fury.io/py/fastapi-users)
[![Downloads](https://pepy.tech/badge/fastapi-users)](https://pepy.tech/project/fastapi-users)

---

**Documentation**: <a href="https://frankie567.github.io/fastapi-users/" target="_blank">https://frankie567.github.io/fastapi-users/</a>

**Source Code**: <a href="https://github.com/frankie567/fastapi-users" target="_blank">https://github.com/frankie567/fastapi-users</a>

---

Add quickly a registration and authentication system to your [FastAPI](https://fastapi.tiangolo.com/) project. **FastAPI Users** is designed to be as customizable and adaptable as possible.

## Features

* [X] Extensible base user model
* [X] Ready-to-use register, login, forgot and reset password routes
* [X] Ready-to-use OAuth2 flow
* [X] Dependency callables to inject current user in route
* [X] Customizable database backend
    * [X] SQLAlchemy async backend included thanks to [encode/databases](https://www.encode.io/databases/)
    * [X] MongoDB async backend included thanks to [mongodb/motor](https://github.com/mongodb/motor)
    * [X] [Tortoise ORM](https://tortoise-orm.readthedocs.io/en/latest/) backend included
* [X] Multiple customizable authentication backends
    * [X] JWT authentication backend included
    * [X] Cookie authentication backend included
* [X] Full OpenAPI schema support, even with several authentication backends

## Development

### Setup environement

You should have [Pipenv](https://pipenv.readthedocs.io/en/latest/) installed. Then, you can install the dependencies with:

```bash
pipenv install --dev
```

After that, activate the virtual environment:

```bash
pipenv shell
```

### Run unit tests

You can run all the tests with:

```bash
make test
```

The command will start a MongoDB container for the related unit tests. So you should have [Docker](https://www.docker.com/get-started) installed.

Alternatively, you can run `pytest` yourself. The MongoDB unit tests will be skipped if no server is available on your local machine:

```bash
pytest
```

### Format the code

Execute the following command to apply `isort` and `black` formatting:

```bash
make format
```

## License

This project is licensed under the terms of the MIT license.

