xpodev / ez-web

2 stars 0 forks source link

Module system to automatically extend EZ #29

Closed binyamin555 closed 6 months ago

binyamin555 commented 7 months ago

The module system should automatically extend the EZ API.

This can be done by looking up a predefine file / directory name and extending EZ with it.

This should be done by the module manager. Doing so can also allow us to generate stub file for the APIs and add them to the appropriate typing directory.

The only missing detail is what name should the EZ API be extended with. Although this can be taken from the directory name of the module.

So that modules/plugins extends EZ with plugins (ez.plugins), modules/templates extends EZ with templates (ez.templates) and so on.

neriyaco commented 7 months ago

I suggest following python's magic names patterns: __api__.py which will be the default name. We can also make it customizable via manifest.yaml under an entry like api_path, this way we can declare a whole folder as the api.