-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfactory.py
More file actions
36 lines (25 loc) · 1.01 KB
/
factory.py
File metadata and controls
36 lines (25 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""Protocols for creating UiPath runtime instances."""
from typing import Protocol
from uipath.runtime.base import UiPathDisposableProtocol, UiPathRuntimeProtocol
class UiPathRuntimeScannerProtocol(Protocol):
"""Protocol for discovering all UiPath runtime instances."""
async def discover_runtimes(self) -> list[UiPathRuntimeProtocol]:
"""Discover all runtime classes."""
...
def discover_entrypoints(self) -> list[str]:
"""Discover all runtime entrypoints."""
...
class UiPathRuntimeCreatorProtocol(Protocol):
"""Protocol for creating a UiPath runtime given an entrypoint."""
async def new_runtime(
self, entrypoint: str, runtime_id: str, **kwargs
) -> UiPathRuntimeProtocol:
"""Create a new runtime instance."""
...
class UiPathRuntimeFactoryProtocol(
UiPathRuntimeCreatorProtocol,
UiPathRuntimeScannerProtocol,
UiPathDisposableProtocol,
Protocol,
):
"""Protocol for discovering and creating UiPath runtime instances."""