From 13ed13af9cd919ad29c5ded38a36a4c63a0f8d54 Mon Sep 17 00:00:00 2001 From: Ivan Maslov Date: Tue, 25 Oct 2022 07:26:39 +0300 Subject: [PATCH] add fastapi app get --- Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py b/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py index a263bde3..f05e4672 100755 --- a/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py +++ b/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py @@ -1171,6 +1171,12 @@ def WebRequestGet(): if hasattr(lCurrentThread, "request"): return lCurrentThread.request +from fastapi import FastAPI +def WebAppGet() -> FastAPI: + """L+,W+: Вернуть экземпляр веб сервера fastapi.FastAPI (app). Подробнее про app см. https://fastapi.tiangolo.com/tutorial/first-steps/ + """ + return Server.app + def WebUserLoginGet(inAuthTokenStr: str=None) -> str: """L+,W+: Получить логин авторизованного пользователя. Если авторизация не производилась - вернуть None