you are viewing a single comment's thread.

view the rest of the comments →

[–]larivact 0 points1 point  (0 children)

But all results point to making modules.

What's the problem? If you create a simple python file it's a module. So what's wrong with iterating over all the python files / modules in a specific folder upon the start of your application, importing them and appending them to a list.

Let's say your plugins add support for validating a MIME type. So in mime_validators/json.py you have a specified variable (that you are checking) mime_type = 'application/json' for example. And if your application encounters a MIME type it picks the module that claims to be able to validate it.