Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion azure/durable_functions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 3 additions & 2 deletions azure/durable_functions/decorators/__init__.py
Original file line number Diff line number Diff line change
@@ -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"
]
19 changes: 16 additions & 3 deletions azure/durable_functions/decorators/durable_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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