Skip to content

rhhayward/py_load_modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py_load_modules

Description

py_load_modules is a python3 library which takes a class, and a list of directories. It will search within those directories (without any recursive searching) for classes which implement the argument class. It will return a list of instances of those classes for use.

Installation

python3 -m pip install  git+https://github.com/rhhayward/py_load_modules.git@master

Usage

Assuming a directory structure like this:

from load_modules import load_modules

modules = load_modules.load(SuperClass, ['/path/to/py_files/', 'relative_path/to/py_files'])
for module in modules:
    module.class_method()

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages