plugins: doc for external plugins/entry points
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
3577f8877c
commit
66323e32f0
1 changed files with 20 additions and 0 deletions
|
@ -1,6 +1,26 @@
|
||||||
Plugin API documentation
|
Plugin API documentation
|
||||||
========================
|
========================
|
||||||
|
|
||||||
|
External plugins
|
||||||
|
----------------
|
||||||
|
|
||||||
|
It is possible to create external plugins easily using `setuptools'
|
||||||
|
entry_point
|
||||||
|
<https://setuptools.readthedocs.io/en/latest/setuptools.html#dynamic-discovery-of-services-and-plugins>`_
|
||||||
|
feature. You can register your plugin against the ``poezio_plugins`` entry
|
||||||
|
group with the following snippet in your project ``setup.py``:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
setup(
|
||||||
|
..
|
||||||
|
packages=['yourmodule'],
|
||||||
|
entry_points{'poezio_plugins': 'yourplugin = yourmodule'},
|
||||||
|
..
|
||||||
|
)
|
||||||
|
|
||||||
|
The plugin will then be available as ``yourplugin`` at runtime.
|
||||||
|
|
||||||
BasePlugin
|
BasePlugin
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue