-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Allow injection of types based on protocols. Services can declare themselves what protocol they support and the container can then perform autowiring based on that.
class SupportsFoo(Protocol):
def foo(self) -> str:
pass
@service(supports=SupportsFoo)
class FooBar:
def foo(self):
return "bar"Requesting SupportsFoo will have FooBar injected.
MurfyJB, Stuckya, MateuszSiwiecki and alorence
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers