simulacrum-sdk 0.2.1__py3-none-any.whl → 0.2.2__py3-none-any.whl

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.

Potentially problematic release.


This version of simulacrum-sdk might be problematic. Click here for more details.

simulacrum/models.py CHANGED
@@ -4,7 +4,7 @@ from datetime import datetime
4
4
  from typing import List, Optional, Sequence, Union
5
5
 
6
6
  import numpy as np
7
- from pydantic import BaseModel, field_validator
7
+ from pydantic import BaseModel, field_validator, model_validator
8
8
 
9
9
 
10
10
  class ForecastRequest(BaseModel):
@@ -77,5 +77,13 @@ class ValidateAPIKeyResponse(BaseModel):
77
77
  """
78
78
 
79
79
  valid: bool
80
- client: str
80
+ client: Optional[str] = None
81
+ key_id: Optional[str] = None
81
82
  expires_at: Optional[datetime]
83
+
84
+ @model_validator(mode="after")
85
+ def _coalesce_client(self):
86
+ # Prefer explicit client; fall back to key_id when provided by API
87
+ if not self.client and self.key_id:
88
+ self.client = self.key_id
89
+ return self
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simulacrum-sdk
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Official Python SDK for accessing the Simulacrum API.
5
5
  Author-email: "Simulacrum, Inc." <support@smlcrm.com>
6
6
  License-Expression: MIT
@@ -4,9 +4,9 @@ simulacrum/api.py,sha256=dj1xF6KfBLHMML0AicnoHElRzaNjPxooQxBARX219c0,1645
4
4
  simulacrum/client.py,sha256=fCIGpHXgt89GO9UIcXNvVohJ-trRKqOwHL6B9K4rh3I,4874
5
5
  simulacrum/config.py,sha256=n3iN-cVUF3ucINS3iydDgMnFoMtVxDeVBIQwGiMKNk8,157
6
6
  simulacrum/exceptions.py,sha256=YrqoQjaPcZI31PmXd5evOl4fQjzxmz2sc8a3dSzkAMI,3408
7
- simulacrum/models.py,sha256=o0guwVykziwEoSi63l_ySjVkBm2_qTxgQ08Xt2igKa8,2646
8
- simulacrum_sdk-0.2.1.dist-info/licenses/LICENSE,sha256=A7B9zAs2uCAzJoZPPyJW0G86yM-BTyum90vD4nSsOe0,1084
9
- simulacrum_sdk-0.2.1.dist-info/METADATA,sha256=CVdS_iL6sS0CgNEG4DxgOujkGZhcu2aRi9FiZSS71oc,6326
10
- simulacrum_sdk-0.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
- simulacrum_sdk-0.2.1.dist-info/top_level.txt,sha256=CLUzfwEa7vZDf6zBAH8eXC2lZLMtj92MlXHOc3-V16o,11
12
- simulacrum_sdk-0.2.1.dist-info/RECORD,,
7
+ simulacrum/models.py,sha256=zmLTgfQNI6N1eruSCvmE8j0_N8mxP4oLpiIkj8yuZ08,2958
8
+ simulacrum_sdk-0.2.2.dist-info/licenses/LICENSE,sha256=A7B9zAs2uCAzJoZPPyJW0G86yM-BTyum90vD4nSsOe0,1084
9
+ simulacrum_sdk-0.2.2.dist-info/METADATA,sha256=vUbfXp3Qy1So7J166GJfgRbvF22Ok5XmvqvNqH8ljN4,6326
10
+ simulacrum_sdk-0.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
+ simulacrum_sdk-0.2.2.dist-info/top_level.txt,sha256=CLUzfwEa7vZDf6zBAH8eXC2lZLMtj92MlXHOc3-V16o,11
12
+ simulacrum_sdk-0.2.2.dist-info/RECORD,,