Skip to content

Option to pass a dictionary with explicit names #17

@simonw

Description

@simonw

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions