File: installation.rst

package info (click to toggle)
flask-security 5.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,420 kB
  • sloc: python: 23,164; javascript: 204; makefile: 138
file content (48 lines) | stat: -rw-r--r-- 1,688 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Installation
=============

Installing Flask-Security using::

    pip install flask-security

will install the basic package along with its required dependencies:

* Flask
* Flask-Login
* Flask-Principal
* Flask-WTF
* email-validator
* itsdangerous
* passlib
* Blinker

These are not sufficient for a complete application - other packages are
required based on features desired, password hash algorithms, storage backend, etc.
Flask-Security has additional distribution 'extras' that can reduce the hassle
of figuring out all the required packages. You can install these using the
standard pip syntax::

    pip install flask-security[extra1,extra2, ...]

Supported extras are:

* ``babel`` - Translation services. It will install babel and Flask-Babel.
* ``fsqla`` - Use flask-sqlalchemy and sqlalchemy as your storage interface.
* ``common`` - Install Flask-Mailman, argon2 (the default password hash), and bleach.
* ``mfa`` - Install packages used for multi-factor (two-factor, unified signin, WebAuthn):
  cryptography, qrcode, phonenumberslite (note that for SMS you still need
  to pick an SMS provider and install appropriate packages), and webauthn.

Your application will also need a database backend:

* Sqlite is supported out of the box.
* For PostgreSQL install `psycopg2`_.
* For MySQL install `pymysql`_.
* For MongoDB install `Mongoengine`_.

For additional details on configuring your database engine connector - refer to `sqlalchemy_engine`_

.. _psycopg2: https://pypi.org/project/psycopg2/
.. _pymysql: https://pypi.org/project/PyMySQL/
.. _Mongoengine: https://pypi.org/project/mongoengine/
.. _sqlalchemy_engine: https://docs.sqlalchemy.org/en/14/core/engines.html