You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def services()
a = my_service_a()
b = my_dependent_service(a)
return [a, b]
@stackinabox.register(services())
def my_test(...)
...
In the first case, multiple services could be easily added if they were not interdependent on each other.
In the second case, the function can setup interdependent services that utilize each other and return them as a group to be registered in a single call.
The text was updated successfully, but these errors were encountered:
#45 enables the first case in the description; it also provides the ability for the test function to get access to the services via dictionary provided as a keyword parameter. Theoretically the test function should then be able to inter-connect the services as necessary.
I'll have to think about adding detection of the second portion - essentially, analyzing the *args or **kwars for an iterable object, and then ensuring that everything in the iterable is an instance of StackInABoxService, only then could the iterable be consumed as the services.
Enable something like the following:
or
In the first case, multiple services could be easily added if they were not interdependent on each other.
In the second case, the function can setup interdependent services that utilize each other and return them as a group to be registered in a single call.
The text was updated successfully, but these errors were encountered: