Skip to content

Provide a way to have dependency injection from actions #116

@fabioz

Description

@fabioz

Why & who

For instance, sema4ai-di-client uses a private api to get the x-action-context. It should be able to get the Request at any point in the program.

Feature or enhancement

The API still needs to be decided.

Maybe something as the code below could be an option:

@inject_action_context
def my_method(request: Request, action: IAction, other_arg, **kwargs):
    ...

Solution & alternative

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureAdds a completely new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions