-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
65 lines (52 loc) · 1.53 KB
/
Copy path__init__.py
File metadata and controls
65 lines (52 loc) · 1.53 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
"""
ProgramGarden Examples - Node-Based DSL
모든 워크플로우 예제는 workflow_editor/workflows/로 이전되었습니다.
사용법:
from examples.workflow_editor.workflows import (
get_all_categories,
get_workflows_by_category,
get_all_workflows,
get_workflow_by_id,
)
# 카테고리 목록
categories = get_all_categories()
# 카테고리별 워크플로우
futures_workflows = get_workflows_by_category("futures")
# 전체 워크플로우 (36개)
all_workflows = get_all_workflows()
# ID로 조회
workflow = get_workflow_by_id("futures-01")
"""
# workflow_editor/workflows에서 re-export
try:
from .workflow_editor.workflows import (
get_all_categories,
get_workflows_by_category,
get_all_workflows,
get_workflow_by_id,
CATEGORIES,
)
except ImportError:
# fallback for direct import
pass
def get_example(name: str):
"""예제 워크플로우 조회 (deprecated - use get_workflow_by_id instead)"""
try:
return get_workflow_by_id(name)
except (ValueError, NameError):
return None
def list_examples():
"""모든 예제 목록 조회 (deprecated - use get_all_workflows instead)"""
try:
return [w["id"] for w in get_all_workflows()]
except NameError:
return []
__all__ = [
"get_example",
"list_examples",
"get_all_categories",
"get_workflows_by_category",
"get_all_workflows",
"get_workflow_by_id",
"CATEGORIES",
]