Skip to content
Myr

extensions.rst

This file

Path

docs/extensions.rst

48 lines · 1.3 KiB

Last changed by

Merge remote-tracking branch 'origin/2.1.x'David Lordbefore adoption96d39c8

History of this file

Take it

The walk stopped after 200 commits: lines older than 7a444c5 point at it.

update tests for new werkzeug client (#3827)David Lordbefore adoption7a444c5

lines 1–41why, one step back
1Extensions
2==========34Extensions are extra packages that add functionality to a Flask5application. For example, an extension might add support for sending6email or connecting to a database. Some extensions add entire new7frameworks to help build certain types of applications, like a REST API.8910Finding Extensions11------------------1213Flask extensions are usually named "Flask-Foo" or "Foo-Flask". You can14search PyPI for packages tagged with `Framework :: Flask <pypi_>`_.151617Using Extensions18----------------1920Consult each extension's documentation for installation, configuration,21and usage instructions. Generally, extensions pull their own22configuration from :attr:`app.config <flask.Flask.config>` and are23passed an application instance during initialization. For example,24an extension called "Flask-Foo" might be used like this::2526 from flask_foo import Foo2728 foo = Foo()2930 app = Flask(__name__)31 app.config.update(32 FOO_BAR='baz',33 FOO_SPAM='eggs',34 )3536 foo.init_app(app)373839Building Extensions40-------------------41

Merge remote-tracking branch 'origin/2.1.x'David Lordbefore adoption96d39c8

lines 42–45why, one step back
42While `PyPI <pypi_>`_ contains many Flask extensions, you may not find
43an extension that fits your need. If this is the case, you can create44your own, and publish it for others to use as well. Read45:doc:`extensiondev` to develop your own Flask extension.

update tests for new werkzeug client (#3827)David Lordbefore adoption7a444c5

lines 46–48why, one step back
46
4748.. _pypi: https://pypi.org/search/?c=Framework+%3A%3A+Flask