Skip to content

Provide a way to have dependency injection from actions #116

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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