jabb-cli 0.2.0__tar.gz → 0.2.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: jabb-cli
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: CLI for JABB Public API v1 — locations, CX scores, reviews, PNIF, sentiment.
5
5
  Author: JABB
6
6
  License-Expression: MIT
@@ -8,13 +8,17 @@ from jabb_cli.client import ApiClient, ApiError, AuthError, RateLimitError
8
8
  from jabb_cli.cli import RESOURCES
9
9
 
10
10
  _MAX_RESPONSE_BYTES = 25_000 # ~25K tokens guard
11
+ _cached_client: Optional[ApiClient] = None # ponytail: single client instance per process
11
12
 
12
13
  mcp = FastMCP("jabb")
13
14
 
14
15
 
15
16
  def _client() -> ApiClient:
16
- """Instantiate ApiClient; raises AuthError on missing key (propagated as tool error)."""
17
- return ApiClient()
17
+ """Return cached ApiClient; raises AuthError on missing key (propagated as tool error)."""
18
+ global _cached_client
19
+ if _cached_client is None:
20
+ _cached_client = ApiClient()
21
+ return _cached_client
18
22
 
19
23
 
20
24
  def _call(path: str, params: dict) -> dict:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jabb-cli
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: CLI for JABB Public API v1 — locations, CX scores, reviews, PNIF, sentiment.
5
5
  Author: JABB
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "jabb-cli"
3
- version = "0.2.0"
3
+ version = "0.2.1"
4
4
  description = "CLI for JABB Public API v1 — locations, CX scores, reviews, PNIF, sentiment."
5
5
  requires-python = ">=3.11"
6
6
  license = "MIT"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes