{% extends "extensions/layout.html" %} {% block title %}Creating Extensions{% endblock %} {% block body %}

Creating Extensions

Extensions to Flask are regular Python packages. But there are some rules you should/must follow so that we can enlist your extension on the Flask extension registry:

  1. Your extension must be placed in a flaskext. namespace package. This makes it easier for others to locate your extension and does not clutter the PyPI index with generic toplevel packages.
  2. Your extension should have the word “Flask” in the name. This makes it easier to locate all the packages that go well with Flask. This is also how the moderators of the extension registry spot your extension.
  3. The extension should be documented with Sphinx and it's recommended to use intersphinx to interlink the documentation with Flask itself and other extensions it might depend on. It's also recommended to use the Flask Sphinx Themes or a modified version of one of them.
  4. Extensions should have proper dependencies in the setup.py file specified so that installation with pip/easy_install works.
  5. Ideally your extension has at least one example in the repository or tarball so that it's easier to understand how it works.

To simplify creating new extensions there is a script that can bootstrap a new extension: flask-extension-wizard

We scan the PyPI index in regular intervals for new Flask packages so your extension should sooner or later end up here. If this is not quick enough for you, send me a mail. {% endblock %}