Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions source/guides/creating-and-discovering-plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,14 @@ under that namespace:
Specifying ``myapp.plugins.__path__`` to :func:`~pkgutil.iter_modules` causes
it to only look for the modules directly under that namespace. For example,
if you have installed distributions that provide the modules ``myapp.plugins.a``
and ``myapp.plugins.b`` then ``discovered_plugins`` in this case would be:
and ``myapp.plugins.b``, ``discovered_plugins`` uses their fully qualified
names as keys:

.. code-block:: python

{
'a': <module: 'myapp.plugins.a'>,
'b': <module: 'myapp.plugins.b'>,
'myapp.plugins.a': <module: 'myapp.plugins.a'>,
'myapp.plugins.b': <module: 'myapp.plugins.b'>,
}

This sample uses a sub-package as the namespace package (``myapp.plugins``), but
Expand Down
Loading