Open henriquebastos opened 3 years ago
I do think that pluggy is the way to go, I have rolled my own plugin system for some projects and then switched over to pluggy because it already has the features I needed.
I am actually looking for a configuration tool like python-decouple that will allow me to hook up RPCs to update the configuration parameters during runtime. As a separate RPC request, I would also like to be able to save the current value back into the relevant underlying database.
I have looked around but not quite found something that fits my needs. It seems that python-decouple may be one of the closest options, and I do appreciate the simplicity of it. Perhaps this functionality is more complexity than you want in python-decouple. I am trying to decide if I should attempt to shoehorn my solutions into a project like this, or fork into a new project with slightly different goals.
The behavior you're looking for seems different from how python-decouple works. However, with a proper plugin infrastructure you would have the liberty to do whatever you want on top of it.
If you write a PR (with tests) to add the plugin infrastructure, I would gladly help refactor the code to make that central and enable what you desire.
For me. it is important to keep decouple simple and composable.
Over the years, most ppl request adding features to decouple.
I think the API is quite mature and fits well it's purpose.
However 2 areas could be improved:
My idea is to implement pytest's pluggy into decouple do enable this.
I don't know when I'll be able to code a POC, but I'll leave this issue as a request for comments.