I wanted to swap out the implementation of one of the functions based on other logic (to implement _shape= support in Datasette) - but asyncinject currently uses fn.__name__ introspection, which makes this hard to do.
Would be useful if you could optionally do this instead:
registry = Registry.from_dict({
"both": both,
"one": one,
"two": two,
)
Using .from_dict() here so as not to have the Registry() constructor behave differently for different types of input.
I wanted to swap out the implementation of one of the functions based on other logic (to implement
_shape=support in Datasette) - butasyncinjectcurrently usesfn.__name__introspection, which makes this hard to do.Would be useful if you could optionally do this instead:
Using
.from_dict()here so as not to have theRegistry()constructor behave differently for different types of input.