that-depends
that-depends copied to clipboard
List of possible features to implement
https://github.com/ets-labs/python-dependency-injector/pull/765
Can those features be implemented in a way that wouldn't break type checking and require typing.cast()
usage?
I think so. Good type checking is one of the basic ideas of this package. I'm not sure, that we need all these features. It's just some ideas for the future.
For example, I don't like configuration provider and thinking about injecting whole settings object or separating it into smaller singletons instead of configuration provider
- Injecting a factory–I use that a lot. I like the way pdi fills in args for you when it gives you a
Factory
in a caller. - The way pdi does configuration isn't great. I use pydantic-settings v2 and to get it into a
Configuration
object in pdi I had to hack it + you lose type safety. Seems hard but would be so great to solve! - I use
Selector
a lot, it's a great feature.
I'm stoked to see this project coming along! If any of these sound like good starter tasks I'd be interested in trying one out. I'm using pdi in production at my job and need a path forward!
Thank you, Jason! Great to hear, that this project can became useful not only for my projects.
I will split this issue into parts and will write ideas, how they can be implemented, so anyone can contribute.