forked from orbit-oss/flask
Merge branch '1.1.x'
This commit is contained in:
commit
fb4aab5d89
2 changed files with 15 additions and 21 deletions
|
|
@ -5,15 +5,13 @@ Flask Extension Development
|
||||||
|
|
||||||
Flask, being a microframework, often requires some repetitive steps to get
|
Flask, being a microframework, often requires some repetitive steps to get
|
||||||
a third party library working. Many such extensions are already available
|
a third party library working. Many such extensions are already available
|
||||||
on `PyPI <https://pypi.org/search/?c=Framework+%3A%3A+Flask>`_.
|
on `PyPI`_.
|
||||||
|
|
||||||
If you want to create your own Flask extension for something that does not
|
If you want to create your own Flask extension for something that does not
|
||||||
exist yet, this guide to extension development will help you get your
|
exist yet, this guide to extension development will help you get your
|
||||||
extension running in no time and to feel like users would expect your
|
extension running in no time and to feel like users would expect your
|
||||||
extension to behave.
|
extension to behave.
|
||||||
|
|
||||||
.. _Flask Extension Registry: http://flask.pocoo.org/extensions/
|
|
||||||
|
|
||||||
Anatomy of an Extension
|
Anatomy of an Extension
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
|
|
@ -275,15 +273,14 @@ to anything that needs it for the duration of the request.
|
||||||
Learn from Others
|
Learn from Others
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
This documentation only touches the bare minimum for extension
|
This documentation only touches the bare minimum for extension development.
|
||||||
development. If you want to learn more, it's a very good idea to check
|
If you want to learn more, it's a very good idea to check out existing extensions
|
||||||
out existing extensions on the `Flask Extension Registry`_. If you feel
|
on the `PyPI`_. If you feel lost there is still the `mailinglist`_ and the
|
||||||
lost there is still the `mailinglist`_ and the `IRC channel`_ to get some
|
`IRC channel`_ to get some ideas for nice looking APIs. Especially if you do
|
||||||
ideas for nice looking APIs. Especially if you do something nobody before
|
something nobody before you did, it might be a very good idea to get some more
|
||||||
you did, it might be a very good idea to get some more input. This not only
|
input. This not only generates useful feedback on what people might want from
|
||||||
generates useful feedback on what people might want from an extension, but
|
an extension, but also avoids having multiple developers working in isolation
|
||||||
also avoids having multiple developers working in isolation on pretty much the
|
on pretty much the same problem.
|
||||||
same problem.
|
|
||||||
|
|
||||||
Remember: good API design is hard, so introduce your project on the
|
Remember: good API design is hard, so introduce your project on the
|
||||||
mailing list, and let other developers give you a helping hand with
|
mailing list, and let other developers give you a helping hand with
|
||||||
|
|
@ -297,9 +294,8 @@ Approved Extensions
|
||||||
|
|
||||||
Flask also has the concept of approved extensions. Approved extensions
|
Flask also has the concept of approved extensions. Approved extensions
|
||||||
are tested as part of Flask itself to ensure extensions do not break on
|
are tested as part of Flask itself to ensure extensions do not break on
|
||||||
new releases. These approved extensions are listed on the `Flask
|
new releases. If you want your own extension to be approved you have to
|
||||||
Extension Registry`_ and marked appropriately. If you want your own
|
follow these guidelines:
|
||||||
extension to be approved you have to follow these guidelines:
|
|
||||||
|
|
||||||
0. An approved Flask extension requires a maintainer. In the event an
|
0. An approved Flask extension requires a maintainer. In the event an
|
||||||
extension author would like to move beyond the project, the project should
|
extension author would like to move beyond the project, the project should
|
||||||
|
|
@ -338,6 +334,7 @@ extension to be approved you have to follow these guidelines:
|
||||||
10. An extension currently has to support Python 3.4 and newer and 2.7.
|
10. An extension currently has to support Python 3.4 and newer and 2.7.
|
||||||
|
|
||||||
|
|
||||||
|
.. _PyPI: https://pypi.org/search/?c=Framework+%3A%3A+Flask
|
||||||
.. _OAuth extension: https://pythonhosted.org/Flask-OAuth/
|
.. _OAuth extension: https://pythonhosted.org/Flask-OAuth/
|
||||||
.. _mailinglist: http://flask.pocoo.org/mailinglist/
|
.. _mailinglist: http://flask.pocoo.org/mailinglist/
|
||||||
.. _IRC channel: http://flask.pocoo.org/community/irc/
|
.. _IRC channel: http://flask.pocoo.org/community/irc/
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,8 @@ frameworks to help build certain types of applications, like a REST API.
|
||||||
Finding Extensions
|
Finding Extensions
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
Flask extensions are usually named "Flask-Foo" or "Foo-Flask". Many
|
Flask extensions are usually named "Flask-Foo" or "Foo-Flask". You can
|
||||||
extensions are listed in the `Extension Registry`_, which can be updated
|
search PyPI for packages tagged with `Framework :: Flask <pypi_>`_.
|
||||||
by extension developers. You can also search PyPI for packages tagged
|
|
||||||
with `Framework :: Flask <pypi_>`_.
|
|
||||||
|
|
||||||
|
|
||||||
Using Extensions
|
Using Extensions
|
||||||
|
|
@ -43,11 +41,10 @@ an extension called "Flask-Foo" might be used like this::
|
||||||
Building Extensions
|
Building Extensions
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
While the `Extension Registry`_ contains many Flask extensions, you may
|
While the `PyPI <pypi_>`_ contains many Flask extensions, you may
|
||||||
not find an extension that fits your need. If this is the case, you can
|
not find an extension that fits your need. If this is the case, you can
|
||||||
create your own. Read :ref:`extension-dev` to develop your own Flask
|
create your own. Read :ref:`extension-dev` to develop your own Flask
|
||||||
extension.
|
extension.
|
||||||
|
|
||||||
|
|
||||||
.. _Extension Registry: http://flask.pocoo.org/extensions/
|
|
||||||
.. _pypi: https://pypi.org/search/?c=Framework+%3A%3A+Flask
|
.. _pypi: https://pypi.org/search/?c=Framework+%3A%3A+Flask
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue