Skip to content
Myr

Merge pull request #3305 from greyli/update-extension-doc

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Update outdated extension doc

authored by David Lord · committed by GitHub · parents 626b5cc, 90004a8 · Browse files · 2 files+15 added−21 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+15 added−21 removed

  • other:+15 added−21 removed

2 files+15 added−21 removed

modified:docs/extensiondev.rst+12 added-15 removed
3 unmodified lines
4===========================56Flask, being a microframework, often requires some repetitive steps to get7a third party library working. Many such extensions are already available8on `PyPI <https://pypi.org/search/?c=Framework+%3A%3A+Flask>`_.8on `PyPI`_.910If you want to create your own Flask extension for something that does not11exist yet, this guide to extension development will help you get your12extension running in no time and to feel like users would expect your13extension to behave.1415.. _Flask Extension Registry: http://flask.pocoo.org/extensions/1615Anatomy of an Extension16-----------------------1718Extensions are all located in a package called ``flask_something``
253 unmodified lines
272273Learn from Others274-----------------275278This documentation only touches the bare minimum for extension279development. If you want to learn more, it's a very good idea to check280out existing extensions on the `Flask Extension Registry`_. If you feel281lost there is still the `mailinglist`_ and the `IRC channel`_ to get some282ideas for nice looking APIs. Especially if you do something nobody before283you did, it might be a very good idea to get some more input. This not only284generates useful feedback on what people might want from an extension, but285also avoids having multiple developers working in isolation on pretty much the286same problem.276This documentation only touches the bare minimum for extension development.277If you want to learn more, it's a very good idea to check out existing extensions278on the `PyPI`_. If you feel lost there is still the `mailinglist`_ and the279`IRC channel`_ to get some ideas for nice looking APIs. Especially if you do280something nobody before you did, it might be a very good idea to get some more281input. This not only generates useful feedback on what people might want from282an extension, but also avoids having multiple developers working in isolation283on pretty much the same problem.284285Remember: good API design is hard, so introduce your project on the286mailing list, and let other developers give you a helping hand with287designing the API.
5 unmodified lines
293-------------------294295Flask also has the concept of approved extensions. Approved extensions296are tested as part of Flask itself to ensure extensions do not break on300new releases. These approved extensions are listed on the `Flask301Extension Registry`_ and marked appropriately. If you want your own302extension to be approved you have to follow these guidelines:297new releases. If you want your own extension to be approved you have to298follow these guidelines:2993000. An approved Flask extension requires a maintainer. In the event an301 extension author would like to move beyond the project, the project should302 find a new maintainer including full source hosting transition and PyPI
30 unmodified lines
333 even if the extension would be safe for zipping.33410. An extension currently has to support Python 3.4 and newer and 2.7.335336337.. _PyPI: https://pypi.org/search/?c=Framework+%3A%3A+Flask338.. _OAuth extension: https://pythonhosted.org/Flask-OAuth/339.. _mailinglist: http://flask.pocoo.org/mailinglist/340.. _IRC channel: http://flask.pocoo.org/community/irc/341.. _Official Pallets Themes: https://pypi.org/project/Pallets-Sphinx-Themes/
modified:docs/extensions.rst+3 added-6 removed
10 unmodified lines
1112Finding Extensions13------------------1415Flask extensions are usually named "Flask-Foo" or "Foo-Flask". Many16extensions are listed in the `Extension Registry`_, which can be updated17by extension developers. You can also search PyPI for packages tagged18with `Framework :: Flask <pypi_>`_.15Flask extensions are usually named "Flask-Foo" or "Foo-Flask". You can16search PyPI for packages tagged with `Framework :: Flask <pypi_>`_.171819Using Extensions20----------------
19 unmodified lines
4041Building Extensions42-------------------4346While the `Extension Registry`_ contains many Flask extensions, you may44While the `PyPI <pypi_>`_ contains many Flask extensions, you may45not find an extension that fits your need. If this is the case, you can46create your own. Read :ref:`extension-dev` to develop your own Flask47extension.484952.. _Extension Registry: http://flask.pocoo.org/extensions/50.. _pypi: https://pypi.org/search/?c=Framework+%3A%3A+Flask