1
- .. _extension-dev :
2
-
3
1
Flask Extension Development
4
2
===========================
5
3
@@ -276,7 +274,7 @@ Learn from Others
276
274
This documentation only touches the bare minimum for extension development.
277
275
If you want to learn more, it's a very good idea to check out existing extensions
278
276
on the `PyPI `_. If you feel lost there is still the `mailinglist `_ and the
279
- `IRC channel `_ to get some ideas for nice looking APIs. Especially if you do
277
+ `Discord server `_ to get some ideas for nice looking APIs. Especially if you do
280
278
something nobody before you did, it might be a very good idea to get some more
281
279
input. This not only generates useful feedback on what people might want from
282
280
an extension, but also avoids having multiple developers working in isolation
@@ -292,50 +290,45 @@ API. And this can only work if collaboration happens early.
292
290
Approved Extensions
293
291
-------------------
294
292
295
- Flask also has the concept of approved extensions. Approved extensions
296
- are tested as part of Flask itself to ensure extensions do not break on
297
- new releases. If you want your own extension to be approved you have to
298
- follow these guidelines:
293
+ Flask previously had the concept of approved extensions. These came with
294
+ some vetting of support and compatibility. While this list became too
295
+ difficult to maintain over time, the guidelines are still relevant to
296
+ all extensions maintained and developed today, as they help the Flask
297
+ ecosystem remain consistent and compatible.
299
298
300
299
0. An approved Flask extension requires a maintainer. In the event an
301
- extension author would like to move beyond the project, the project should
302
- find a new maintainer including full source hosting transition and PyPI
303
- access. If no maintainer is available, give access to the Flask core team.
304
- 1. An approved Flask extension must provide exactly one package or module
305
- named ``flask_extensionname ``.
306
- 2. It must ship a testing suite that can either be invoked with ``make test ``
307
- or ``python setup.py test ``. For test suites invoked with ``make
308
- test `` the extension has to ensure that all dependencies for the test
309
- are installed automatically. If tests are invoked with ``python setup.py
310
- test ``, test dependencies can be specified in the :file: `setup.py ` file. The
311
- test suite also has to be part of the distribution.
312
- 3. APIs of approved extensions will be checked for the following
313
- characteristics:
314
-
315
- - an approved extension has to support multiple applications
316
- running in the same Python process.
317
- - it must be possible to use the factory pattern for creating
318
- applications.
319
-
320
- 4. The license must be BSD/MIT/WTFPL licensed.
321
- 5. The naming scheme for official extensions is *Flask-ExtensionName * or
322
- *ExtensionName-Flask *.
323
- 6. Approved extensions must define all their dependencies in the
324
- :file: `setup.py ` file unless a dependency cannot be met because it is not
325
- available on PyPI.
326
- 7. The documentation must use the ``flask `` theme from the
327
- `Official Pallets Themes `_.
328
- 8. The setup.py description (and thus the PyPI description) has to
329
- link to the documentation, website (if there is one) and there
330
- must be a link to automatically install the development version
331
- (``PackageName==dev ``).
332
- 9. The ``zip_safe `` flag in the setup script must be set to ``False ``,
333
- even if the extension would be safe for zipping.
334
- 10. An extension currently has to support Python 3.4 and newer and 2.7.
300
+ extension author would like to move beyond the project, the project
301
+ should find a new maintainer and transfer access to the repository,
302
+ documentation, PyPI, and any other services. If no maintainer
303
+ is available, give access to the Pallets core team.
304
+ 1. The naming scheme is *Flask-ExtensionName * or *ExtensionName-Flask *.
305
+ It must provide exactly one package or module named
306
+ ``flask_extension_name ``.
307
+ 2. The extension must be BSD or MIT licensed. It must be open source
308
+ and publicly available.
309
+ 3. The extension's API must have the following characteristics:
310
+
311
+ - It must support multiple applications running in the same Python
312
+ process. Use ``current_app `` instead of ``self.app ``, store
313
+ configuration and state per application instance.
314
+ - It must be possible to use the factory pattern for creating
315
+ applications. Use the ``ext.init_app() `` pattern.
316
+
317
+ 4. From a clone of the repository, an extension with its dependencies
318
+ must be installable with ``pip install -e . ``.
319
+ 5. It must ship a testing suite that can be invoked with ``tox -e py ``
320
+ or ``pytest ``. If not using ``tox ``, the test dependencies should be
321
+ specified in a ``requirements.txt `` file. The tests must be part of
322
+ the sdist distribution.
323
+ 6. The documentation must use the ``flask `` theme from the
324
+ `Official Pallets Themes `_. A link to the documentation or project
325
+ website must be in the PyPI metadata or the readme.
326
+ 7. The active versions of Python should be supported. As of 2020 this
327
+ means Python 3.5 and newer.
335
328
336
329
337
330
.. _PyPI : https://pypi.org/search/?c=Framework+%3A%3A+Flask
338
331
.. _OAuth extension : https://pythonhosted.org/Flask-OAuth/
339
- .. _mailinglist : http ://flask.pocoo .org/mailinglist/
340
- .. _ IRC channel : http ://flask.pocoo.org/community/irc/
332
+ .. _mailinglist : https ://mail.python .org/mailman/listinfo/flask
333
+ .. _ Discord server : https ://discord.gg/t6rrQZH
341
334
.. _Official Pallets Themes : https://pypi.org/project/Pallets-Sphinx-Themes/
0 commit comments