Skip to content

Dependency injection #28

Answered by mdapena
filwaline asked this question in Q&A
Nov 19, 2024 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @filwaline,

Thanks for bringing up this interesting question and use case for Pyventus!

Current State

By default, Pyventus doesn’t include a dependency injection system or utilities for this purpose. This is because the EventLinker is solely designed to orchestrate the linkage of events and their inherent logic (callbacks), while the EventEmitter manages the event emission and its execution, using the current context and the given payload. As a result, event handlers will have access to what is available in the current callable context, the event payload, or the callable object, similar to what a callback will have when it gets executed.

Considerations

There are multiple ways to tackle…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by mdapena
Comment options

You must be logged in to vote
1 reply
@mdapena
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants