in src/aws_secretsmanager_caching/decorators.py [0:0]
def __call__(self, func):
"""
Return a function with cached secret injected as first argument.
:type func: object
:param func: The function for injecting a single non-keyworded argument too.
:return The function with the injected argument.
"""
secret = self.cache.get_secret_string(secret_id=self.secret_id)
def _wrapped_func(*args, **kwargs):
"""
Internal function to execute wrapped function
"""
return func(secret, *args, **kwargs)
return _wrapped_func