In Ruby I like to use a lightweight class that standardizes my calling convention so that .new builds a new object with default dependencies and all runtime parameters are passed to a single public method called .call
def self.call(*args, &block)
Then, I can define my new objects in such a way that I inject dependencies in the constructor and that they have a single public method called .call and call its dependencies there.
class Something < Service
def initialize(something: Something, anything: Anything)
@something = something
@anything = anything
def call(arg1:, arg2:)
result_a = @a.call(...)
result_b = @b.call(...)
How can I achieve the same effect in Python?