lagom
lagom copied to clipboard
📦 Autowiring dependency injection container for python 3
Ideally #187 should be resolved before the documentation makes this feature public.
For the ContextContainer the resolved instance will persist in the singleton even after __exit__ has been called. This doesn't really make sense. It's only an issue in the ContextContainer itself...
Fixes #176 Now that 2.0.0 has released this branch can become active
Early christmas present: 23 Dec 2021 (https://endoflife.date/python)
Currently the container can contain mutable state if it contains singletons. In most usage this would not be an issue and is in fact the required behaviour. However from a...
Hi, How to apply the Decorator design pattern with lagom, on single instance registrations and/or collection registrations? Example how I used to do it with a DI container from C#...
Looking at the provided Flask integration, it does not look like this works when using Flask application factories (https://flask.palletsprojects.com/en/1.1.x/patterns/appfactories/). At the time I initialize the FlaskIntegration library, my app has...
For this code: ```python @dependency_definition(container) async def my_constructor() -> MyComplexDep: return MyComplexDep(some_number=5) assert (await container[Awaitable[MyComplexDep]]) == MyComplexDep(some_number=5) ``` mypy raises these errors: ``` error: Only concrete class can be given...