https://github.com/thor77/pluginloader
A simple plugin loader
https://github.com/thor77/pluginloader
Last synced: 4 months ago
JSON representation
A simple plugin loader
- Host: GitHub
- URL: https://github.com/thor77/pluginloader
- Owner: Thor77
- Created: 2014-07-23T12:02:50.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-07-23T16:07:48.000Z (almost 12 years ago)
- Last Synced: 2024-12-30T23:45:12.119Z (over 1 year ago)
- Language: Python
- Size: 141 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
PluginLoader
============
A simple plugin loader
Usage
=====
### files/folders:
```
pluginloader.py
main.py
plugins
\plugin1
\__init__.py
\plugin2
\__init__.py
```
### main.py:
```python
from pluginloader import PluginLoader
plugin_path = 'plugins'
plugin_classes = []
for plugin_class in PluginLoader(plugin_path):
cl = plugin_class()
plugin_classes.append(cl)
```
Another Plugin Blueprint
========================
### files/folders:
```
pluginloader.py
main.py
pluginblueprint.py
plugins
\plugin1
\__init__.py
\plugin2
\__init__.py
```
### main.py:
```python
from pluginloader import PluginLoader
from pluginblueprint import MyPluginBlueprint
plugin_path = 'plugins'
plugin_classes = []
for plugin_class in PluginLoader(plugin_path, MyPluginBlueprint):
cl = plugin_class()
plugin_classes.append(cl)
```