sonilo-cli 0.1.0__tar.gz → 0.1.1__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.
- {sonilo_cli-0.1.0 → sonilo_cli-0.1.1}/PKG-INFO +1 -1
- {sonilo_cli-0.1.0 → sonilo_cli-0.1.1}/pyproject.toml +1 -1
- {sonilo_cli-0.1.0 → sonilo_cli-0.1.1}/src/sonilo_cli/__init__.py +1 -1
- {sonilo_cli-0.1.0 → sonilo_cli-0.1.1}/src/sonilo_cli/__main__.py +3 -1
- {sonilo_cli-0.1.0 → sonilo_cli-0.1.1}/tests/test_cli.py +13 -0
- {sonilo_cli-0.1.0 → sonilo_cli-0.1.1}/.gitignore +0 -0
- {sonilo_cli-0.1.0 → sonilo_cli-0.1.1}/LICENSE +0 -0
- {sonilo_cli-0.1.0 → sonilo_cli-0.1.1}/README.md +0 -0
- {sonilo_cli-0.1.0 → sonilo_cli-0.1.1}/tests/__init__.py +0 -0
- {sonilo_cli-0.1.0 → sonilo_cli-0.1.1}/tests/test_context7.py +0 -0
- {sonilo_cli-0.1.0 → sonilo_cli-0.1.1}/tests/test_smoke.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sonilo-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Command-line interface for the Sonilo API: generate music and sound effects from text or video
|
|
5
5
|
Project-URL: Repository, https://github.com/sonilo-ai/sonilo-python
|
|
6
6
|
Author: Sonilo AI
|
|
@@ -43,7 +43,9 @@ def build_client(api_key: Optional[str]) -> Sonilo:
|
|
|
43
43
|
"no API key — pass --api-key <key> or set the "
|
|
44
44
|
"SONILO_API_KEY environment variable"
|
|
45
45
|
)
|
|
46
|
-
|
|
46
|
+
# Identify as the CLI rather than inheriting the SDK's own name, so CLI
|
|
47
|
+
# traffic stays separable from direct SDK use in server-side analytics.
|
|
48
|
+
return Sonilo(api_key=key, client_name="cli-python", client_version=__version__)
|
|
47
49
|
|
|
48
50
|
|
|
49
51
|
def cmd_account(client: Sonilo, args: argparse.Namespace) -> None:
|
|
@@ -369,3 +369,16 @@ def test_video_to_video_sound_requires_a_video_source():
|
|
|
369
369
|
with pytest.raises(SystemExit) as exc:
|
|
370
370
|
run(["video-to-video-sound"])
|
|
371
371
|
assert exc.value.code == 1
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
def test_cli_identifies_itself_not_the_sdk():
|
|
375
|
+
"""CLI traffic must be separable from direct SDK use in analytics."""
|
|
376
|
+
import sonilo_cli
|
|
377
|
+
from sonilo_cli.__main__ import build_client
|
|
378
|
+
|
|
379
|
+
client = build_client("sk-test")
|
|
380
|
+
try:
|
|
381
|
+
assert client._http.headers["x-sonilo-client"] == "cli-python"
|
|
382
|
+
assert client._http.headers["x-sonilo-client-version"] == sonilo_cli.__version__
|
|
383
|
+
finally:
|
|
384
|
+
client.close()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|