79494117

Date: 2025-03-08 08:43:29
Score: 1
Natty:
Report link

May be a late answer, but you could try using a dedicated ioc container. I've written jstreams (https://pypi.org/project/jstreams/), a library that provides a pretty advanced dependency injector, as well as Java-like stream and optional functionality and a minimal RX implementation. In the latest version you can simply use the component() decorator to mark your class as a dependency, then access it using inject(ClassName)

Reasons:
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Cristi Trohin