kiwoom-cli 0.6.1__tar.gz → 0.6.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/PKG-INFO +9 -6
  2. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/README.md +8 -5
  3. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli/__init__.py +1 -1
  4. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli/main.py +26 -9
  5. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli.egg-info/PKG-INFO +9 -6
  6. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/pyproject.toml +1 -1
  7. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/tests/test_cli.py +1 -1
  8. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/LICENSE +0 -0
  9. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli/api_spec.py +0 -0
  10. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli/auth.py +0 -0
  11. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli/client.py +0 -0
  12. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli/commands/__init__.py +0 -0
  13. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli/commands/account.py +0 -0
  14. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli/commands/dashboard.py +0 -0
  15. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli/commands/market.py +0 -0
  16. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli/commands/order.py +0 -0
  17. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli/commands/stock.py +0 -0
  18. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli/commands/stream.py +0 -0
  19. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli/commands/watch.py +0 -0
  20. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli/config.py +0 -0
  21. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli/formatters.py +0 -0
  22. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli/output.py +0 -0
  23. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli/secure_store.py +0 -0
  24. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli/streaming.py +0 -0
  25. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli.egg-info/SOURCES.txt +0 -0
  26. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli.egg-info/dependency_links.txt +0 -0
  27. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli.egg-info/entry_points.txt +0 -0
  28. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli.egg-info/requires.txt +0 -0
  29. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/kiwoom_cli.egg-info/top_level.txt +0 -0
  30. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/setup.cfg +0 -0
  31. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/tests/test_client.py +0 -0
  32. {kiwoom_cli-0.6.1 → kiwoom_cli-0.6.2}/tests/test_formatters.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kiwoom-cli
3
- Version: 0.6.1
3
+ Version: 0.6.2
4
4
  Summary: User-friendly CLI for the Kiwoom Securities REST API (키움증권)
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/gejyn14/kiwoom-cli
@@ -92,16 +92,19 @@ appkey/secretkey는 보안을 위해 환경변수를 지원하지 않습니다.
92
92
  ```bash
93
93
  # 프로필별 설정
94
94
  kiwoom config setup --profile default # 메인계좌
95
- kiwoom config setup --profile isa # ISA계좌
95
+ kiwoom config setup --profile isa # ISA계좌
96
96
 
97
- # ISA 프로필 전환
98
- kiwoom config use isa
97
+ # 프로필 설정 변경
98
+ kiwoom config set domain prod # 도메인 변경
99
+ kiwoom config set account 1234567 # 계좌번호 설정
100
+ kiwoom -p isa config set domain mock # 특정 프로필
99
101
 
100
- # 프로필 목록 확인
102
+ # 프로필 전환 / 목록
103
+ kiwoom config use isa
101
104
  kiwoom config profiles
102
105
 
103
106
  # 특정 프로필로 사용
104
- kiwoom -p default account balance
107
+ kiwoom -p isa account balance
105
108
  kiwoom -p isa auth login
106
109
  ```
107
110
 
@@ -58,16 +58,19 @@ appkey/secretkey는 보안을 위해 환경변수를 지원하지 않습니다.
58
58
  ```bash
59
59
  # 프로필별 설정
60
60
  kiwoom config setup --profile default # 메인계좌
61
- kiwoom config setup --profile isa # ISA계좌
61
+ kiwoom config setup --profile isa # ISA계좌
62
62
 
63
- # ISA 프로필 전환
64
- kiwoom config use isa
63
+ # 프로필 설정 변경
64
+ kiwoom config set domain prod # 도메인 변경
65
+ kiwoom config set account 1234567 # 계좌번호 설정
66
+ kiwoom -p isa config set domain mock # 특정 프로필
65
67
 
66
- # 프로필 목록 확인
68
+ # 프로필 전환 / 목록
69
+ kiwoom config use isa
67
70
  kiwoom config profiles
68
71
 
69
72
  # 특정 프로필로 사용
70
- kiwoom -p default account balance
73
+ kiwoom -p isa account balance
71
74
  kiwoom -p isa auth login
72
75
  ```
73
76
 
@@ -1,3 +1,3 @@
1
1
  """Kiwoom Securities REST API CLI."""
2
2
 
3
- __version__ = "0.6.1"
3
+ __version__ = "0.6.2"
@@ -150,16 +150,30 @@ def config_show(ctx):
150
150
  console.print(f" 보안: [bold]{'SecureStore 활성' if initialized else '미초기화'}[/]")
151
151
 
152
152
 
153
- @config_cmd.command("domain")
154
- @click.argument("domain", type=click.Choice(["prod", "mock"]))
153
+ @config_cmd.command("set")
154
+ @click.argument("key", type=click.Choice(["domain", "account"]))
155
+ @click.argument("value")
155
156
  @click.pass_context
156
- def config_domain(ctx, domain: str):
157
- """도메인 변경 (prod/mock)."""
157
+ def config_set(ctx, key: str, value: str):
158
+ """프로필 설정 변경. (예: kiwoom config set domain prod)"""
158
159
  profile = config.resolve_profile(ctx.obj.get("profile") if ctx.obj else None)
160
+ if key == "domain" and value not in ("prod", "mock"):
161
+ console.print("[red]domain은 prod 또는 mock만 가능합니다.[/]")
162
+ raise SystemExit(1)
159
163
  cfg = config.load_config()
160
- cfg.setdefault("profiles", {}).setdefault(profile, {})["domain"] = domain
164
+ cfg.setdefault("profiles", {}).setdefault(profile, {})[key] = value
161
165
  config.save_config(cfg)
162
- console.print(f"[green]도메인 변경:[/] {config.DOMAINS[domain]} (프로필: {profile})")
166
+ display = config.DOMAINS[value] if key == "domain" else value
167
+ console.print(f"[green]{key} 변경:[/] {display} (프로필: {profile})")
168
+
169
+
170
+ # Backward compatibility: keep 'domain' as alias
171
+ @config_cmd.command("domain", hidden=True)
172
+ @click.argument("domain", type=click.Choice(["prod", "mock"]))
173
+ @click.pass_context
174
+ def config_domain(ctx, domain: str):
175
+ """도메인 변경 (config set domain의 별칭)."""
176
+ ctx.invoke(config_set, key="domain", value=domain)
163
177
 
164
178
 
165
179
  @config_cmd.command("use")
@@ -183,11 +197,14 @@ def config_profiles():
183
197
  if not profiles:
184
198
  console.print("[yellow]등록된 프로필이 없습니다.[/]")
185
199
  return
200
+ console.print(f" 현재 프로필: [bold green]{default}[/]")
201
+ console.print()
186
202
  for name, settings in profiles.items():
187
- marker = " [green](기본)[/]" if name == default else ""
203
+ marker = " [green]*[/]" if name == default else " "
188
204
  domain = settings.get("domain", "mock")
189
- account = settings.get("account", "(미설정)")
190
- console.print(f" {name}{marker} 도메인={domain} 계좌={account}")
205
+ account = settings.get("account", "")
206
+ account_str = f" 계좌={account}" if account else ""
207
+ console.print(f" {marker} {name:15s} 도메인={domain}{account_str}")
191
208
 
192
209
 
193
210
  # ── Auth ──────────────────────────────────────────────
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kiwoom-cli
3
- Version: 0.6.1
3
+ Version: 0.6.2
4
4
  Summary: User-friendly CLI for the Kiwoom Securities REST API (키움증권)
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/gejyn14/kiwoom-cli
@@ -92,16 +92,19 @@ appkey/secretkey는 보안을 위해 환경변수를 지원하지 않습니다.
92
92
  ```bash
93
93
  # 프로필별 설정
94
94
  kiwoom config setup --profile default # 메인계좌
95
- kiwoom config setup --profile isa # ISA계좌
95
+ kiwoom config setup --profile isa # ISA계좌
96
96
 
97
- # ISA 프로필 전환
98
- kiwoom config use isa
97
+ # 프로필 설정 변경
98
+ kiwoom config set domain prod # 도메인 변경
99
+ kiwoom config set account 1234567 # 계좌번호 설정
100
+ kiwoom -p isa config set domain mock # 특정 프로필
99
101
 
100
- # 프로필 목록 확인
102
+ # 프로필 전환 / 목록
103
+ kiwoom config use isa
101
104
  kiwoom config profiles
102
105
 
103
106
  # 특정 프로필로 사용
104
- kiwoom -p default account balance
107
+ kiwoom -p isa account balance
105
108
  kiwoom -p isa auth login
106
109
  ```
107
110
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "kiwoom-cli"
7
- version = "0.6.1"
7
+ version = "0.6.2"
8
8
  description = "User-friendly CLI for the Kiwoom Securities REST API (키움증권)"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
@@ -17,7 +17,7 @@ def runner():
17
17
  def test_version(runner):
18
18
  result = runner.invoke(cli, ["--version"])
19
19
  assert result.exit_code == 0
20
- assert "0.6.1" in result.output
20
+ assert "0.6.2" in result.output
21
21
 
22
22
 
23
23
  def test_help(runner):
File without changes
File without changes