refactor: form-core wiring, JWT sessions, slowapi, packaging, frontend rewrite, test declutter
This commit is contained in:
parent
06ab25fb47
commit
03af41e837
74 changed files with 6089 additions and 5183 deletions
|
|
@ -8,7 +8,7 @@ from __future__ import annotations
|
|||
|
||||
import httpx
|
||||
|
||||
from .base_client import BaseApiClient
|
||||
from .base_client import BaseApiClient, transport_retry
|
||||
|
||||
|
||||
class LangflowError(Exception):
|
||||
|
|
@ -29,6 +29,7 @@ class LangflowClient(BaseApiClient):
|
|||
def __init__(self, base_url: str, api_key: str = "", timeout: float = 60.0) -> None:
|
||||
super().__init__(base_url, timeout=timeout, api_key=api_key)
|
||||
|
||||
@transport_retry
|
||||
async def list_flows(self) -> list[dict]:
|
||||
"""List flows (header mode keeps payloads small)."""
|
||||
try:
|
||||
|
|
@ -44,6 +45,7 @@ class LangflowClient(BaseApiClient):
|
|||
except httpx.HTTPError as exc:
|
||||
raise LangflowUnavailable(f"Langflow unreachable: {exc}") from exc
|
||||
|
||||
@transport_retry
|
||||
async def export_flow(self, langflow_flow_id: str) -> dict:
|
||||
"""Export one flow as Langflow JSON (FlowRead: id/name/description/data)."""
|
||||
try:
|
||||
|
|
@ -58,6 +60,7 @@ class LangflowClient(BaseApiClient):
|
|||
except httpx.HTTPError as exc:
|
||||
raise LangflowUnavailable(f"Langflow unreachable: {exc}") from exc
|
||||
|
||||
@transport_retry
|
||||
async def upsert_flow(self, doc: dict) -> dict:
|
||||
"""Create or update a flow in Langflow by name (authoring UI refresh).
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue