Skip to content

A simple example of how to dynamically add modules to your python projects

Notifications You must be signed in to change notification settings

tekgeek88/python-plugin-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plugin System

Plugin System is a simple program used to show how to dynamically add modules to your Python project.

Installation

Simply clone the repo and run the following command to install the requirements

pip install -r requirements.txt

Open config.toml to set the plugin path

Execute with the following command

python3 main.py

Example Output

Plugin System starting...
Loading plugins from: plugins
Loading plugin: one
Imported module: <module 'one' from '/Users/cargabright/Dev/python/python-plugin-starter/plugins/one.py'>
Plugin one initialised
Plugin one args:  ('Hello', 'World') {'option1': 1, 'option2': 'Options are good'}
Executing plugin one
Loading plugin: two
Imported module: <module 'two' from '/Users/cargabright/Dev/python/python-plugin-starter/plugins/two.py'>
Plugin two initialised
Plugin two args:  ('Hello', 'World') {'option1': 1, 'option2': 'Options are good'}
Executing plugin two
Finished successfully!

License

MIT

About

A simple example of how to dynamically add modules to your python projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages