diff --git a/azure/durable_functions/__init__.py b/azure/durable_functions/__init__.py index a6c4f934..d0946f37 100644 --- a/azure/durable_functions/__init__.py +++ b/azure/durable_functions/__init__.py @@ -74,7 +74,8 @@ def validate_extension_bundles(): try: # disabling linter on this line because it fails to recognize the conditional export - from .decorators import DFApp # noqa + from .decorators import DFApp, BluePrint # noqa __all__.append('DFApp') + __all__.append('BluePrint') except ModuleNotFoundError: pass diff --git a/azure/durable_functions/decorators/__init__.py b/azure/durable_functions/decorators/__init__.py index 87615a51..604e543e 100644 --- a/azure/durable_functions/decorators/__init__.py +++ b/azure/durable_functions/decorators/__init__.py @@ -1,8 +1,9 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. """Decorator definitions for Durable Functions.""" -from .durable_app import DFApp +from .durable_app import DFApp, BluePrint __all__ = [ - "DFApp" + "DFApp", + "BluePrint" ] diff --git a/azure/durable_functions/decorators/durable_app.py b/azure/durable_functions/decorators/durable_app.py index 5b57cd8b..5219be39 100644 --- a/azure/durable_functions/decorators/durable_app.py +++ b/azure/durable_functions/decorators/durable_app.py @@ -11,10 +11,14 @@ from functools import wraps -class DFApp(FunctionRegister, TriggerApi, BindingApi): - """Durable Functions (DF) app. +class BluePrint(TriggerApi, BindingApi): + """Durable Functions (DF) blueprint container. + + It allows functions to be declared via trigger and binding decorators, + but does not automatically index/register these functions. - Exports the decorators required to register DF Function-types. + To register these functions, utilize the `register_functions` method from any + :class:`FunctionRegister` subclass, such as `DFApp`. """ def __init__(self, @@ -226,3 +230,12 @@ def decorator(): return decorator() return wrap + + +class DFApp(BluePrint, FunctionRegister): + """Durable Functions (DF) app. + + Exports the decorators required to declare and index DF Function-types. + """ + + pass