simudyne-pulse 0.7.0.dev4__tar.gz → 0.7.0.dev5__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.
Files changed (26) hide show
  1. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/PKG-INFO +1 -1
  2. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/pyproject.toml +1 -1
  3. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/resources/data.py +21 -12
  4. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/resources/fix.py +7 -5
  5. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/resources/fm.py +71 -43
  6. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/resources/simulation.py +403 -316
  7. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/resources/simulator_gym.py +33 -20
  8. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/resources/validation.py +185 -122
  9. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne_pulse.egg-info/PKG-INFO +1 -1
  10. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/LICENSE +0 -0
  11. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/README.md +0 -0
  12. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/setup.cfg +0 -0
  13. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/__init__.py +0 -0
  14. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/client.py +0 -0
  15. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/exceptions.py +0 -0
  16. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/resources/__init__.py +0 -0
  17. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/resources/api_keys.py +0 -0
  18. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/resources/historical.py +0 -0
  19. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne/resources/profile.py +0 -0
  20. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne_pulse.egg-info/SOURCES.txt +0 -0
  21. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne_pulse.egg-info/dependency_links.txt +0 -0
  22. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne_pulse.egg-info/requires.txt +0 -0
  23. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/src/simudyne_pulse.egg-info/top_level.txt +0 -0
  24. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/tests/test_new_resources.py +0 -0
  25. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/tests/test_simulator_gym.py +0 -0
  26. {simudyne_pulse-0.7.0.dev4 → simudyne_pulse-0.7.0.dev5}/tests/test_validation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simudyne-pulse
3
- Version: 0.7.0.dev4
3
+ Version: 0.7.0.dev5
4
4
  Summary: Python SDK for the Simudyne Pulse synthetic market data API
5
5
  Author-email: Simudyne <support@simudyne.com>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "simudyne-pulse"
7
- version = "0.7.0-dev.4"
7
+ version = "0.7.0-dev.5"
8
8
  description = "Python SDK for the Simudyne Pulse synthetic market data API"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -20,19 +20,28 @@ class DataResource:
20
20
  All arguments are optional filters; with none passed the whole catalog
21
21
  comes back, as before.
22
22
 
23
- Args:
24
- symbol: Exact symbol, e.g. "700.HK".
25
- exchange: Exchange protocol, e.g. "hkex_securities".
26
- provider: Data provider, e.g. "omd" or "bmll".
27
- date: Calibration date "YYYY-MM-DD". Keeps only instruments
28
- calibrated on that date, and narrows each instrument's
29
- available_dates to it.
30
- q: Case-insensitive substring match over ticker and company name.
31
- limit: Max instruments to return.
32
- offset: Instruments to skip (for paging alongside limit).
23
+ Parameters
24
+ ----------
25
+ symbol : str, optional
26
+ Exact symbol, e.g. "700.HK".
27
+ exchange : str, optional
28
+ Exchange protocol, e.g. "hkex_securities".
29
+ provider : str, optional
30
+ Data provider, e.g. "omd" or "bmll".
31
+ date : str, optional
32
+ Calibration date "YYYY-MM-DD". Keeps only instruments
33
+ calibrated on that date, and narrows each instrument's
34
+ available_dates to it.
35
+ q : str, optional
36
+ Case-insensitive substring match over ticker and company name.
37
+ limit : int, optional
38
+ Max instruments to return.
39
+ offset : int, optional
40
+ Instruments to skip (for paging alongside limit).
33
41
 
34
- Returns:
35
- list of instrument dicts, each with available_dates.
42
+ Returns
43
+ -------
44
+ list of instrument dicts, each with available_dates.
36
45
  """
37
46
  params = {
38
47
  k: v for k, v in {
@@ -18,13 +18,15 @@ class FixResource:
18
18
  def usage(self) -> dict:
19
19
  """FIX simulation statistics: what was run over FIX, and how often.
20
20
 
21
- Returns:
22
- dict with ``total_runs``, ``simulated_seconds``, and ``runs`` — one
21
+ Returns
22
+ -------
23
+ dict with ``total_runs``, ``simulated_seconds``, and ``runs`` — one
23
24
  entry per distinct configuration, each with its ``symbol``,
24
25
  ``cal_date``, ``scenario`` and ``runs`` count.
25
26
 
26
- Example:
27
- >>> usage = client.fix.usage()
28
- >>> print(f"{usage['total_runs']} FIX runs")
27
+ Examples
28
+ --------
29
+ >>> usage = client.fix.usage()
30
+ >>> print(f"{usage['total_runs']} FIX runs")
29
31
  """
30
32
  return self._client._request("GET", USAGE_PATH)
@@ -47,8 +47,9 @@ class FmResource:
47
47
  ``min_prompt_rows``, and the ``model_args`` descriptors for the knobs
48
48
  run() will accept. Pro tier.
49
49
 
50
- Returns:
51
- dict with a ``models`` list.
50
+ Returns
51
+ -------
52
+ dict with a ``models`` list.
52
53
  """
53
54
  return self._client._request("GET", MODELS_PATH)
54
55
 
@@ -71,19 +72,29 @@ class FmResource:
71
72
  restricts the result to the (provider, exchange) markets that model's
72
73
  ``supported_data`` declares — exactly what run() will accept.
73
74
 
74
- Args:
75
- model_id: Registered model (see models()). Unknown id -> 404.
76
- symbol: Exact symbol, e.g. "TSCO" or "700".
77
- q: Case-insensitive substring match over the symbol.
78
- provider: Data provider, e.g. "bmll".
79
- exchange: Protocol, e.g. "lse" or "hkex_securities".
80
- date: Trading date YYYY-MM-DD; keeps only symbols with data on it,
81
- and only that date.
82
- limit: Max symbols to return (default 50, max 200).
83
- offset: Symbols to skip, for paging.
84
-
85
- Returns:
86
- dict with ``symbols`` (each with its provider, exchange and dates)
75
+ Parameters
76
+ ----------
77
+ model_id : str, optional
78
+ Registered model (see models()). Unknown id -> 404.
79
+ symbol : str, optional
80
+ Exact symbol, e.g. "TSCO" or "700".
81
+ q : str, optional
82
+ Case-insensitive substring match over the symbol.
83
+ provider : str, optional
84
+ Data provider, e.g. "bmll".
85
+ exchange : str, optional
86
+ Protocol, e.g. "lse" or "hkex_securities".
87
+ date : str, optional
88
+ Trading date YYYY-MM-DD; keeps only symbols with data on it,
89
+ and only that date.
90
+ limit : int, default 50
91
+ Max symbols to return (default 50, max 200).
92
+ offset : int, default 0
93
+ Symbols to skip, for paging.
94
+
95
+ Returns
96
+ -------
97
+ dict with ``symbols`` (each with its provider, exchange and dates)
87
98
  and ``total``, paged by symbol identity.
88
99
  """
89
100
  params = {"limit": limit, "offset": offset}
@@ -112,28 +123,42 @@ class FmResource:
112
123
  ) -> dict:
113
124
  """Submit a foundation-model inference job. Pro tier.
114
125
 
115
- Args:
116
- model_id: A model from models().
117
- symbol: Symbol whose real data becomes the prompt context.
118
- cal_date: Trading date of the prompt, YYYY-MM-DD.
119
- provider: Data provider, e.g. "bmll".
120
- exchange: Exchange protocol, e.g. "hkex_securities".
121
- duration_minutes: Sim horizon as wall-clock minutes measured from
122
- the first row of the context. The resulting frame count is
123
- reported in the run's output rather than requested up front.
124
- horizon: Raw frame count — the older form; applies only when
125
- duration_minutes is unset.
126
- n_runs: Monte Carlo runs, 1-8 (per-run seeds derived from ``seed``
127
- exactly as the ABM derives them).
128
- seed: Random seed (default 42).
129
- model_args: Overrides for the model's declared knobs (see
130
- models()); unknown or out-of-range keys are rejected with 400.
131
- device: "cpu" or "gpu"; None uses the model's default.
132
- exec_algos: Execution algorithms, the ABM's config shape. At most
133
- one per job; market runs only.
134
-
135
- Returns:
136
- dict with job_id, the model version, and the queued sim_ids.
126
+ Parameters
127
+ ----------
128
+ model_id : str
129
+ A model from models().
130
+ symbol : str
131
+ Symbol whose real data becomes the prompt context.
132
+ cal_date : str
133
+ Trading date of the prompt, YYYY-MM-DD.
134
+ provider : str
135
+ Data provider, e.g. "bmll".
136
+ exchange : str
137
+ Exchange protocol, e.g. "hkex_securities".
138
+ duration_minutes : float, optional
139
+ Sim horizon as wall-clock minutes measured from
140
+ the first row of the context. The resulting frame count is
141
+ reported in the run's output rather than requested up front.
142
+ horizon : int, optional
143
+ Raw frame count — the older form; applies only when
144
+ duration_minutes is unset.
145
+ n_runs : int, default 1
146
+ Monte Carlo runs, 1-8 (per-run seeds derived from ``seed``
147
+ exactly as the ABM derives them).
148
+ seed : int, default 42
149
+ Random seed (default 42).
150
+ model_args : dict, optional
151
+ Overrides for the model's declared knobs (see
152
+ models()); unknown or out-of-range keys are rejected with 400.
153
+ device : str, optional
154
+ "cpu" or "gpu"; None uses the model's default.
155
+ exec_algos : list, optional
156
+ Execution algorithms, the ABM's config shape. At most
157
+ one per job; market runs only.
158
+
159
+ Returns
160
+ -------
161
+ dict with job_id, the model version, and the queued sim_ids.
137
162
  """
138
163
  payload = {
139
164
  "model_id": model_id,
@@ -165,8 +190,9 @@ class FmResource:
165
190
  ) -> dict:
166
191
  """Start a live streaming session instead of a batch job. Pro tier.
167
192
 
168
- Returns:
169
- dict with ``token`` (used to connect to the live chart),
193
+ Returns
194
+ -------
195
+ dict with ``token`` (used to connect to the live chart),
170
196
  ``job_id`` and ``model_id``.
171
197
  """
172
198
  payload = {"model_id": model_id, "seed": seed}
@@ -179,8 +205,9 @@ class FmResource:
179
205
  def job_status(self, job_id: str) -> dict:
180
206
  """Foundation-model job status.
181
207
 
182
- Returns:
183
- dict with job_id, ``status``, ``message``, ``detail``,
208
+ Returns
209
+ -------
210
+ dict with job_id, ``status``, ``message``, ``detail``,
184
211
  ``started_at`` and ``completed_at``. ``status`` is one of queued,
185
212
  provisioning, starting, running, complete or failed — only the
186
213
  last two are terminal (see TERMINAL_STATUSES), so poll until one
@@ -193,7 +220,8 @@ class FmResource:
193
220
  def job_logs(self, job_id: str) -> dict:
194
221
  """Foundation-model job pod logs.
195
222
 
196
- Returns:
197
- dict with ``logs`` — the thing to read when a job failed.
223
+ Returns
224
+ -------
225
+ dict with ``logs`` — the thing to read when a job failed.
198
226
  """
199
227
  return self._client._request("GET", f"{JOBS_PATH}/{job_id}/logs")