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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sonilo-cli
3
- Version: 0.1.0
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
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "sonilo-cli"
7
- version = "0.1.0"
7
+ version = "0.1.1"
8
8
  description = "Command-line interface for the Sonilo API: generate music and sound effects from text or video"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -1,3 +1,3 @@
1
- __version__ = "0.1.0"
1
+ __version__ = "0.1.1"
2
2
 
3
3
  __all__ = ["__version__"]
@@ -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
- return Sonilo(api_key=key)
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