Files
Dorod-Sky/skyvern/__init__.py

82 lines
2.0 KiB
Python
Raw Normal View History

2024-07-30 16:13:51 -07:00
from ddtrace import tracer
from ddtrace.trace import TraceFilter, Span
from ddtrace.ext import http
import re
from skyvern.forge.sdk.forge_log import setup_logger
class FilterHeartbeat(TraceFilter):
_HB_URL = re.compile(r"http://.*/heartbeat$")
def process_trace(self, trace: list[Span]) -> list[Span] | None:
for span in trace:
url = span.get_tag(http.URL)
if span.parent_id is None and url is not None and self._HB_URL.match(url):
# drop the full trace chunk
return None
return trace
tracer.configure(trace_processors=[FilterHeartbeat()])
setup_logger()
2025-03-16 15:46:34 -07:00
2025-03-30 18:34:48 -07:00
from skyvern.forge import app # noqa: E402, F401
from skyvern.library import Skyvern # noqa: E402
2025-08-10 13:16:46 -07:00
from skyvern.core.script_generations.skyvern_page import RunContext, SkyvernPage # noqa: E402
from skyvern.core.script_generations.run_initializer import setup # noqa: E402
from skyvern.core.script_generations.workflow_wrappers import ( # noqa: E402
2025-08-16 17:48:10 -07:00
cached, # noqa: E402
2025-08-10 13:16:46 -07:00
workflow, # noqa: E402
2025-06-18 00:44:46 -07:00
) # noqa: E402
2025-08-16 17:48:10 -07:00
from skyvern.services.script_service import ( # noqa: E402
action, # noqa: E402
download, # noqa: E402
extract, # noqa: E402
2025-09-10 17:22:00 -07:00
http_request, # noqa: E402
goto, # noqa: E402
2025-08-16 17:48:10 -07:00
login, # noqa: E402
loop, # noqa: E402
2025-09-10 17:22:00 -07:00
parse_file, # noqa: E402
parse_pdf, # noqa: E402
2025-09-10 17:22:00 -07:00
prompt, # noqa: E402
render_list, # noqa: E402
render_template, # noqa: E402
run_code, # noqa: E402
2025-08-16 17:48:10 -07:00
run_script, # noqa: E402
run_task, # noqa: E402
2025-09-10 17:22:00 -07:00
send_email, # noqa: E402
2025-09-12 13:01:17 -07:00
upload_file, # noqa: E402
validate, # noqa: E402
2025-08-16 17:48:10 -07:00
wait, # noqa: E402
) # noqa: E402
2025-06-18 00:44:46 -07:00
__all__ = [
"Skyvern",
"SkyvernPage",
"RunContext",
2025-08-16 17:48:10 -07:00
"action",
"cached",
"download",
"extract",
2025-09-10 17:22:00 -07:00
"http_request",
"goto",
2025-08-16 17:48:10 -07:00
"login",
"loop",
2025-09-10 17:22:00 -07:00
"parse_file",
"parse_pdf",
2025-09-10 17:22:00 -07:00
"prompt",
"render_list",
"render_template",
"run_code",
2025-08-16 17:48:10 -07:00
"run_script",
"run_task",
2025-09-10 17:22:00 -07:00
"send_email",
2025-06-18 00:44:46 -07:00
"setup",
2025-09-12 13:01:17 -07:00
"upload_file",
"validate",
2025-08-16 17:48:10 -07:00
"wait",
2025-08-10 13:16:46 -07:00
"workflow",
2025-06-18 00:44:46 -07:00
]