Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Freedom to extend decouple with plugins. #115

Open
henriquebastos opened this issue Jun 8, 2021 · 2 comments
Open

RFC: Freedom to extend decouple with plugins. #115

henriquebastos opened this issue Jun 8, 2021 · 2 comments

Comments

@henriquebastos
Copy link
Collaborator

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:

  1. An easy way to add new Repositories, so you can work with whatever data source you want. It could be either a complex file structure or a remote repository.
  2. An easy way to aggregate useful casts for different frameworks or projects.

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.

@SterlingPeet
Copy link

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.

@henriquebastos
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants