datfid 0.1.15__py3-none-any.whl → 0.1.16__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.
datfid/client.py CHANGED
@@ -156,7 +156,7 @@ class DATFIDClient:
156
156
  current_features: Optional[list] = None,
157
157
  filter_by_significance: bool = False,
158
158
  meanvar_test: bool = False
159
- ) -> SimpleNamespace:
159
+ ) -> Dict[str, SimpleNamespace]:
160
160
  """
161
161
  Fit a model individual by individual using the DATFID API.
162
162
 
@@ -200,8 +200,10 @@ class DATFIDClient:
200
200
  if response.status_code != 200:
201
201
  raise Exception(f"Model fit failed: {response.text}")
202
202
 
203
- result_dict = response.json()
204
- return SimpleNamespace(**result_dict)
203
+ raw = response.json() # { "<id>": { ... per-id result ... }, ... }
204
+ # Wrap each per-id result into a SimpleNamespace for dot access:
205
+ result_per_id = {str(k): SimpleNamespace(**v) for k, v in raw.items()}
206
+ return result_per_id # Dict[str, SimpleNamespace]
205
207
 
206
208
  def forecast_model_ind(
207
209
  self,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datfid
3
- Version: 0.1.15
3
+ Version: 0.1.16
4
4
  Summary: SDK to access the DATFID API hosted on Hugging Face Spaces
5
5
  Author: DATFID
6
6
  Author-email: igor.schapiro@datfid.com
@@ -0,0 +1,7 @@
1
+ datfid/__init__.py,sha256=PojdUQsimZvawR8lgqVpzs3EkRtkA7iwuDk7fovJF54,34
2
+ datfid/client.py,sha256=uza0OZBtm5aQF0xdFF2TIBUOYeQ9zYmX-hS8-OBXWqw,8267
3
+ datfid-0.1.16.dist-info/licenses/LICENSE,sha256=5b2JLb1-P8Nt919phjUmP0umS82SxGMlIF2QFn9ILgM,1084
4
+ datfid-0.1.16.dist-info/METADATA,sha256=frz6VkxxFwrNeY7-ZbN2U4H7nCwN3-DIH9WkEQyHJtU,5146
5
+ datfid-0.1.16.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
6
+ datfid-0.1.16.dist-info/top_level.txt,sha256=VFG23u9NMNQJ8S_IFfW-S5d8oSUd71SFA346ovh_uxA,7
7
+ datfid-0.1.16.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- datfid/__init__.py,sha256=PojdUQsimZvawR8lgqVpzs3EkRtkA7iwuDk7fovJF54,34
2
- datfid/client.py,sha256=TG5uQ7CdGPPzT6AjcDIEutif1Su6b7SIlWz1ESyKeRY,8053
3
- datfid-0.1.15.dist-info/licenses/LICENSE,sha256=5b2JLb1-P8Nt919phjUmP0umS82SxGMlIF2QFn9ILgM,1084
4
- datfid-0.1.15.dist-info/METADATA,sha256=6Jp03iucoUMM7ewaNhOce2ju9G8zjfErSFqZj18JlHU,5146
5
- datfid-0.1.15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
6
- datfid-0.1.15.dist-info/top_level.txt,sha256=VFG23u9NMNQJ8S_IFfW-S5d8oSUd71SFA346ovh_uxA,7
7
- datfid-0.1.15.dist-info/RECORD,,