Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update setup.py and convert README to markdown
- Loading branch information
1 parent
f7e0b7d
commit d3d37e8
Showing
3 changed files
with
45 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# PluginBase | ||
|
||
PluginBase is a module for Python that enables the | ||
development of flexible plugin systems in Python. | ||
|
||
Step 1: | ||
```python | ||
from pluginbase import PluginBase | ||
plugin_base = PluginBase(package='yourapplication.plugins') | ||
``` | ||
|
||
Step 2: | ||
```python | ||
plugin_source = plugin_base.make_plugin_source( | ||
searchpath=['./path/to/plugins', './path/to/more/plugins']) | ||
``` | ||
|
||
Step 3: | ||
```python | ||
with plugin_source: | ||
from yourapplication.plugins import my_plugin | ||
my_plugin.do_something_cool() | ||
``` | ||
|
||
Or alternatively: | ||
```python | ||
my_plugin = plugin_source.load_plugin('my_plugin') | ||
my_plugin.do_something_cool() | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters