https://github.com/thor77/pluginfileloader
A simple pluginloader for files
https://github.com/thor77/pluginfileloader
Last synced: 7 months ago
JSON representation
A simple pluginloader for files
- Host: GitHub
- URL: https://github.com/thor77/pluginfileloader
- Owner: Thor77
- Created: 2014-10-14T16:49:11.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-10-14T16:52:02.000Z (over 11 years ago)
- Last Synced: 2024-12-30T23:45:09.402Z (over 1 year ago)
- Language: Python
- Size: 113 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:
```
pluginfileloader.py
main.py
plugins
\plugin1.py
\plugin2.py
```
### main.py:
```python
from pluginfileloader import PluginFileLoader
plugin_path = 'plugins'
plugin_classes = []
for plugin_class in PluginFileLoader(plugin_path):
cl = plugin_class()
plugin_classes.append(cl)
```
Another Plugin Blueprint
========================
### files/folders:
```
pluginfileloader.py
main.py
pluginblueprint.py
plugins
\plugin1.py
\plugin2.py
```
### main.py:
```python
from pluginfileloader import PluginFileLoader
from pluginblueprint import MyPluginBlueprint
plugin_path = 'plugins'
plugin_classes = []
for plugin_class in PluginFileLoader(plugin_path, MyPluginBlueprint):
cl = plugin_class()
plugin_classes.append(cl)
```