You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Transparent auto injection methods on Client at Client.auto_inject and Client.auto_inject_async. These wrap functions to make calls to them automatically inject dependencies and are transparent replacements for the self injecting system.
More information on these can be found here.
A system for setting the injection client for a local scope (as defined by contextvars) and making dependency injection calls based on said context.
More information on this can be found here.
alluka.abc.Client.make_context method for creating a client bound context.
Changed
get_type_dependency and get_cached_value both now raise a KeyError when no value is found and no default was provided.
alluka.abc.Client.call_with_di and alluka.abc.Client.call_with_async_di now provide default implementations which use Client.make_context.
alluka.abc.Context.call_with_di and alluka.abc.Context.call_with_async_di now provide default implementations which use Context.injection_client.
Deprecated
Client.as_self_injecting in favour of Client.auto_inject.
Client.as_async_self_injecting in favour of Client.auto_inject_async.
alluka.SelfInjecting in favour of Client.auto_inject.
alluka.AsyncSelfInjecting in favour of Client.auto_inject_async.