Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thor77/pluginloader
A simple plugin loader
https://github.com/thor77/pluginloader
Last synced: about 8 hours ago
JSON representation
A simple plugin loader
- Host: GitHub
- URL: https://github.com/thor77/pluginloader
- Owner: Thor77
- Created: 2014-07-23T12:02:50.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-07-23T16:07:48.000Z (over 10 years ago)
- Last Synced: 2024-09-11T01:56:05.622Z (about 2 months 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 PluginLoaderplugin_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 MyPluginBlueprintplugin_path = 'plugins'
plugin_classes = []
for plugin_class in PluginLoader(plugin_path, MyPluginBlueprint):
cl = plugin_class()
plugin_classes.append(cl)
```