ProgramGarden Core - 노드 기반 DSL 핵심 타입 정의
Project description
ProgramGarden Core
ProgramGarden은 AI 시대에 맞춰 파이썬을 모르는 투자자도 개인화된 시스템 트레이딩을 자동으로 수행할 수 있게 돕는 오픈소스입니다. 본 저장소는 노드 기반 DSL의 핵심 타입, 베이스 클래스, 레지스트리, i18n을 정의하는 "코어" 모듈입니다.
- 문서(비개발자 빠른 시작): https://programgarden.gitbook.io/docs/invest/non_dev_quick_guide
- 문서(개발자 구조 안내): https://programgarden.gitbook.io/docs/develop/structure
- 유튜브: https://www.youtube.com/@programgarden
- 실시간소통 오픈톡방: https://open.kakao.com/o/gKVObqUh
주요 특징
- 노드 기반 DSL: 68개 내장 노드를 조합하여 워크플로우를 정의하는 도메인 특화 언어
- 타입 안전한 스키마: Pydantic 모델 기반의 FieldSchema, 입출력 포트 정의로 IDE 친화적이고 안전한 개발
- 레지스트리 시스템: NodeTypeRegistry와 PluginRegistry로 노드/플러그인 메타데이터 관리
- 다국어 지원(i18n): 한국어/영어 번역 파일을 통한 노드 설명, 필드명 자동 번역
- 상품별 분리: 해외주식(
overseas_stock)과 해외선물(overseas_futures)을 독립된 노드로 지원 - 플러그인 확장: ConditionNode에 커뮤니티 전략 플러그인(RSI, MACD 등)을 연결하여 확장
설치
pip install programgarden-core
# Poetry 사용 시 (개발 환경)
poetry add programgarden-core
요구 사항: Python 3.12+
노드 카테고리 (11개, 68개 코어 노드)
| 카테고리 | 노드 수 | 대표 노드 |
|---|---|---|
| infra | 8 | StartNode, BrokerNode, ThrottleNode, SplitNode, AggregateNode, IfNode, KoreaStockBrokerNode |
| account | 12 | AccountNode, OpenOrdersNode, RealAccountNode, RealOrderEventNode (해외주식/선물 + 국내주식) |
| market | 20 | MarketDataNode, HistoricalDataNode, RealMarketDataNode, WatchlistNode, ExclusionListNode, CurrencyRateNode, KoreaStock* |
| condition | 2 | ConditionNode, LogicNode |
| order | 10 | NewOrderNode, ModifyOrderNode, CancelOrderNode, PositionSizingNode (해외주식/선물 + 국내주식) |
| risk | 1 | PortfolioNode |
| schedule | 2 | ScheduleNode, TradingHoursFilterNode |
| data | 3 | SQLiteNode, HTTPRequestNode, FieldMappingNode |
| display | 6 | TableDisplayNode, LineChartNode, CandlestickChartNode, SummaryDisplayNode |
| analysis | 2 | BacktestEngineNode, BenchmarkCompareNode |
| ai | 2 | LLMModelNode, AIAgentNode |
community 패키지에서 4개 노드 추가: TelegramNode(messaging), FearGreedIndexNode(market), FundamentalDataNode(market), FileReaderNode(data) → 전체 72개
사용 예시
from programgarden_core import (
# 노드
StartNode, ConditionNode, LogicNode,
OverseasStockBrokerNode, OverseasStockAccountNode,
# 모델
Edge, WorkflowDefinition, WorkflowJob, JobState,
# 레지스트리
NodeTypeRegistry, PluginRegistry,
)
# 레지스트리에서 노드 스키마 조회
registry = NodeTypeRegistry()
schema = registry.get_schema("OverseasStockBrokerNode")
print(schema.config_schema)
패키지 구조
programgarden_core/
├── nodes/ # 68개 노드 정의 (base.py, infra.py, account.py, ...)
├── bases/ # Finance 베이스 클래스
├── models/ # Pydantic 모델 (FieldSchema, Edge, WorkflowDefinition 등)
├── registry/ # NodeTypeRegistry, PluginRegistry
├── i18n/locales/ # 번역 파일 (ko.json, en.json)
└── exceptions/ # DSL/Finance 예외 클래스
기여하기
이슈/토론/PR 환영합니다. 버그 리포트 시 재현 단계와 최소 예시를 함께 제공해 주시면 빠르게 대응할 수 있습니다.
변경 로그
자세한 변경 사항은 CHANGELOG.md를 참고하세요.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file programgarden_core-1.11.0.tar.gz.
File metadata
- Download URL: programgarden_core-1.11.0.tar.gz
- Upload date:
- Size: 194.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.13.3 Darwin/25.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6424a3ee6ac9b21851eeb6c811254741524379424364cd2be5ef765f706fb76
|
|
| MD5 |
f3b1cef77bc3f9e20db1af818d92f338
|
|
| BLAKE2b-256 |
d56b4279361ade8f17d0acccdd0841e1a786529c107fb169988c51c97158641a
|
File details
Details for the file programgarden_core-1.11.0-py3-none-any.whl.
File metadata
- Download URL: programgarden_core-1.11.0-py3-none-any.whl
- Upload date:
- Size: 252.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.13.3 Darwin/25.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90df5aeba4e69965a040017911fa4ddf27103ad7fb18a82401581c4ea007d8f7
|
|
| MD5 |
47f564a72fe15a2de05100c951ae27fd
|
|
| BLAKE2b-256 |
99e79761800f1f389afcec7940d27b1d42d19ed0c438652418f0559bfeb5d0cb
|