everestapi 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.
- {everestapi-0.2.0/src/everestapi.egg-info → everestapi-0.2.1}/PKG-INFO +2 -2
- {everestapi-0.2.0 → everestapi-0.2.1}/README.md +1 -1
- {everestapi-0.2.0 → everestapi-0.2.1}/src/everestapi/__init__.py +1 -1
- {everestapi-0.2.0 → everestapi-0.2.1}/src/everestapi/cli.py +12 -12
- {everestapi-0.2.0 → everestapi-0.2.1}/src/everestapi/client.py +2 -2
- {everestapi-0.2.0 → everestapi-0.2.1}/src/everestapi/mcp/server.py +4 -4
- {everestapi-0.2.0 → everestapi-0.2.1/src/everestapi.egg-info}/PKG-INFO +2 -2
- {everestapi-0.2.0 → everestapi-0.2.1}/tests/test_cli.py +1 -0
- {everestapi-0.2.0 → everestapi-0.2.1}/tests/test_client.py +2 -0
- {everestapi-0.2.0 → everestapi-0.2.1}/tests/test_mcp_and_models.py +1 -0
- {everestapi-0.2.0 → everestapi-0.2.1}/LICENSE +0 -0
- {everestapi-0.2.0 → everestapi-0.2.1}/pyproject.toml +0 -0
- {everestapi-0.2.0 → everestapi-0.2.1}/setup.cfg +0 -0
- {everestapi-0.2.0 → everestapi-0.2.1}/src/everestapi/__main__.py +0 -0
- {everestapi-0.2.0 → everestapi-0.2.1}/src/everestapi/mcp/__init__.py +0 -0
- {everestapi-0.2.0 → everestapi-0.2.1}/src/everestapi/mcp/__main__.py +0 -0
- {everestapi-0.2.0 → everestapi-0.2.1}/src/everestapi/types.py +0 -0
- {everestapi-0.2.0 → everestapi-0.2.1}/src/everestapi.egg-info/SOURCES.txt +0 -0
- {everestapi-0.2.0 → everestapi-0.2.1}/src/everestapi.egg-info/dependency_links.txt +0 -0
- {everestapi-0.2.0 → everestapi-0.2.1}/src/everestapi.egg-info/entry_points.txt +0 -0
- {everestapi-0.2.0 → everestapi-0.2.1}/src/everestapi.egg-info/requires.txt +0 -0
- {everestapi-0.2.0 → everestapi-0.2.1}/src/everestapi.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: everestapi
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Python SDK for the EverestQuant prediction tournament platform
|
|
5
5
|
Author-email: EverestQuant <engineering@everestquant.ai>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -59,7 +59,7 @@ api.submit_futures_predictions(
|
|
|
59
59
|
scores = api.get_scores(model_id="my-model", days=30)
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
Or set `
|
|
62
|
+
Or set `EIQ_API_KEY` as an environment variable and omit the constructor argument.
|
|
63
63
|
|
|
64
64
|
> **Handling your API key.** Shell history, terminal recordings, and CI logs may persist any value you `echo` or `print`. Copy the key via the clipboard rather than echoing it in a recorded session, and prefer storing it in a secrets manager or `.env` file (gitignored) over inlining in source.
|
|
65
65
|
|
|
@@ -29,7 +29,7 @@ api.submit_futures_predictions(
|
|
|
29
29
|
scores = api.get_scores(model_id="my-model", days=30)
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
Or set `
|
|
32
|
+
Or set `EIQ_API_KEY` as an environment variable and omit the constructor argument.
|
|
33
33
|
|
|
34
34
|
> **Handling your API key.** Shell history, terminal recordings, and CI logs may persist any value you `echo` or `print`. Copy the key via the clipboard rather than echoing it in a recorded session, and prefer storing it in a secrets manager or `.env` file (gitignored) over inlining in source.
|
|
35
35
|
|
|
@@ -36,7 +36,7 @@ def cli() -> None:
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
@cli.command()
|
|
39
|
-
@click.option("--api-key", envvar="EVEREST_API_KEY", default=None)
|
|
39
|
+
@click.option("--api-key", envvar=["EIQ_API_KEY", "EVEREST_API_KEY"], default=None)
|
|
40
40
|
def health(api_key: str | None) -> None:
|
|
41
41
|
"""Check API health."""
|
|
42
42
|
api = _get_api(api_key)
|
|
@@ -51,7 +51,7 @@ def health(api_key: str | None) -> None:
|
|
|
51
51
|
@click.option("--universe", "-u", default="futures", help="Universe (futures/equities)")
|
|
52
52
|
@click.option("--split", "-s", default="train", help="Split (train/validation/test/live)")
|
|
53
53
|
@click.option("--output", "-o", default=None, help="Output file path")
|
|
54
|
-
@click.option("--api-key", envvar="EVEREST_API_KEY", default=None)
|
|
54
|
+
@click.option("--api-key", envvar=["EIQ_API_KEY", "EVEREST_API_KEY"], default=None)
|
|
55
55
|
def download_data(universe: str, split: str, output: str | None, api_key: str | None) -> None:
|
|
56
56
|
"""Download tournament dataset."""
|
|
57
57
|
api = _get_api(api_key)
|
|
@@ -68,7 +68,7 @@ def download_data(universe: str, split: str, output: str | None, api_key: str |
|
|
|
68
68
|
@click.option("--split", "-s", default="validation")
|
|
69
69
|
@click.option("--version", "-v", default="v0")
|
|
70
70
|
@click.option("--output", "-o", default=None)
|
|
71
|
-
@click.option("--api-key", envvar="EVEREST_API_KEY", default=None)
|
|
71
|
+
@click.option("--api-key", envvar=["EIQ_API_KEY", "EVEREST_API_KEY"], default=None)
|
|
72
72
|
def download_benchmark(universe: str, split: str, version: str, output: str | None, api_key: str | None) -> None:
|
|
73
73
|
"""Download benchmark model predictions."""
|
|
74
74
|
api = _get_api(api_key)
|
|
@@ -88,7 +88,7 @@ def download_benchmark(universe: str, split: str, version: str, output: str | No
|
|
|
88
88
|
help="Predictions file (.parquet or .csv). Parquet recommended.",
|
|
89
89
|
)
|
|
90
90
|
@click.option("--tournament", "-t", default="equities", help="Tournament (equities/futures)")
|
|
91
|
-
@click.option("--api-key", envvar="EVEREST_API_KEY", default=None)
|
|
91
|
+
@click.option("--api-key", envvar=["EIQ_API_KEY", "EVEREST_API_KEY"], default=None)
|
|
92
92
|
def submit(model: str, file_path: str, tournament: str, api_key: str | None) -> None:
|
|
93
93
|
"""Submit predictions from a Parquet or CSV file.
|
|
94
94
|
|
|
@@ -135,7 +135,7 @@ def submit(model: str, file_path: str, tournament: str, api_key: str | None) ->
|
|
|
135
135
|
@cli.command()
|
|
136
136
|
@click.option("--period", "-p", default="30d", help="Period (7d/30d/90d/all)")
|
|
137
137
|
@click.option("--tournament", "-t", default="equities", help="Tournament (equities/futures)")
|
|
138
|
-
@click.option("--api-key", envvar="EVEREST_API_KEY", default=None)
|
|
138
|
+
@click.option("--api-key", envvar=["EIQ_API_KEY", "EVEREST_API_KEY"], default=None)
|
|
139
139
|
def leaderboard(period: str, tournament: str, api_key: str | None) -> None:
|
|
140
140
|
"""Show tournament leaderboard."""
|
|
141
141
|
api = _get_api(api_key)
|
|
@@ -153,7 +153,7 @@ def leaderboard(period: str, tournament: str, api_key: str | None) -> None:
|
|
|
153
153
|
@cli.command()
|
|
154
154
|
@click.option("--model", "-m", required=True, help="Model identifier")
|
|
155
155
|
@click.option("--days", "-d", default=30, help="Look-back window")
|
|
156
|
-
@click.option("--api-key", envvar="EVEREST_API_KEY", default=None)
|
|
156
|
+
@click.option("--api-key", envvar=["EIQ_API_KEY", "EVEREST_API_KEY"], default=None)
|
|
157
157
|
def scores(model: str, days: int, api_key: str | None) -> None:
|
|
158
158
|
"""Show scoring results for a model."""
|
|
159
159
|
api = _get_api(api_key)
|
|
@@ -166,7 +166,7 @@ def scores(model: str, days: int, api_key: str | None) -> None:
|
|
|
166
166
|
|
|
167
167
|
@cli.command()
|
|
168
168
|
@click.option("--model", "-m", required=True, help="Model identifier")
|
|
169
|
-
@click.option("--api-key", envvar="EVEREST_API_KEY", default=None)
|
|
169
|
+
@click.option("--api-key", envvar=["EIQ_API_KEY", "EVEREST_API_KEY"], default=None)
|
|
170
170
|
def diagnostics(model: str, api_key: str | None) -> None:
|
|
171
171
|
"""Show per-round diagnostics for a model."""
|
|
172
172
|
api = _get_api(api_key)
|
|
@@ -180,7 +180,7 @@ def diagnostics(model: str, api_key: str | None) -> None:
|
|
|
180
180
|
@cli.command()
|
|
181
181
|
@click.option("--tournament", "-t", default="equities", help="Tournament (equities/futures)")
|
|
182
182
|
@click.option("--limit", "-n", default=10, help="Number of rounds")
|
|
183
|
-
@click.option("--api-key", envvar="EVEREST_API_KEY", default=None)
|
|
183
|
+
@click.option("--api-key", envvar=["EIQ_API_KEY", "EVEREST_API_KEY"], default=None)
|
|
184
184
|
def rounds(tournament: str, limit: int, api_key: str | None) -> None:
|
|
185
185
|
"""List tournament rounds."""
|
|
186
186
|
api = _get_api(api_key)
|
|
@@ -192,7 +192,7 @@ def rounds(tournament: str, limit: int, api_key: str | None) -> None:
|
|
|
192
192
|
|
|
193
193
|
|
|
194
194
|
@cli.command()
|
|
195
|
-
@click.option("--api-key", envvar="EVEREST_API_KEY", default=None)
|
|
195
|
+
@click.option("--api-key", envvar=["EIQ_API_KEY", "EVEREST_API_KEY"], default=None)
|
|
196
196
|
def credits(api_key: str | None) -> None:
|
|
197
197
|
"""Check compute credit balance."""
|
|
198
198
|
api = _get_api(api_key)
|
|
@@ -205,7 +205,7 @@ def credits(api_key: str | None) -> None:
|
|
|
205
205
|
|
|
206
206
|
@cli.command()
|
|
207
207
|
@click.option("--model", "-m", required=True, help="Model identifier")
|
|
208
|
-
@click.option("--api-key", envvar="EVEREST_API_KEY", default=None)
|
|
208
|
+
@click.option("--api-key", envvar=["EIQ_API_KEY", "EVEREST_API_KEY"], default=None)
|
|
209
209
|
def stake_balance(model: str, api_key: str | None) -> None:
|
|
210
210
|
"""Show stake balance and pending payouts."""
|
|
211
211
|
api = _get_api(api_key)
|
|
@@ -228,14 +228,14 @@ def register(name: str, email: str) -> None:
|
|
|
228
228
|
click.echo(f" Agent ID: {result['agent_id']}")
|
|
229
229
|
click.echo(f" API Key: {result['api_key']} (save this — shown once)")
|
|
230
230
|
click.echo(f"\nSet your API key:")
|
|
231
|
-
click.echo(f" export
|
|
231
|
+
click.echo(f" export EIQ_API_KEY={result['api_key']}")
|
|
232
232
|
except EverestError as e:
|
|
233
233
|
click.echo(f"Error: {e}", err=True)
|
|
234
234
|
sys.exit(1)
|
|
235
235
|
|
|
236
236
|
|
|
237
237
|
@cli.command()
|
|
238
|
-
@click.option("--api-key", envvar="EVEREST_API_KEY", default=None)
|
|
238
|
+
@click.option("--api-key", envvar=["EIQ_API_KEY", "EVEREST_API_KEY"], default=None)
|
|
239
239
|
def universe(api_key: str | None) -> None:
|
|
240
240
|
"""Show current tournament universe."""
|
|
241
241
|
api = _get_api(api_key)
|
|
@@ -108,7 +108,7 @@ class EverestAPI:
|
|
|
108
108
|
Parameters
|
|
109
109
|
----------
|
|
110
110
|
api_key : str, optional
|
|
111
|
-
EverestQuant API key. Falls back to ``EVEREST_API_KEY`` env var.
|
|
111
|
+
EverestQuant API key. Falls back to ``EIQ_API_KEY`` (or legacy ``EVEREST_API_KEY``) env var.
|
|
112
112
|
base_url : str, optional
|
|
113
113
|
Base URL for the API. Defaults to ``https://everestquant.ai`` (apex
|
|
114
114
|
domain), overridable via ``EVEREST_API_URL`` env var.
|
|
@@ -136,7 +136,7 @@ class EverestAPI:
|
|
|
136
136
|
cf_access_client_id: str | None = None,
|
|
137
137
|
cf_access_client_secret: str | None = None,
|
|
138
138
|
) -> None:
|
|
139
|
-
self.api_key = api_key or os.getenv("EVEREST_API_KEY", "")
|
|
139
|
+
self.api_key = api_key or os.getenv("EIQ_API_KEY") or os.getenv("EVEREST_API_KEY", "")
|
|
140
140
|
self.base_url = (base_url or self.DEFAULT_BASE_URL).rstrip("/")
|
|
141
141
|
self.tournament = tournament
|
|
142
142
|
|
|
@@ -10,7 +10,7 @@ Run::
|
|
|
10
10
|
python -m everestapi.mcp
|
|
11
11
|
|
|
12
12
|
Requires environment variables:
|
|
13
|
-
|
|
13
|
+
EIQ_API_KEY — your EverestQuant API key (also accepts legacy EVEREST_API_KEY)
|
|
14
14
|
EIQ_BASE_URL — API base URL (default: https://everestquant.ai)
|
|
15
15
|
CF_ACCESS_CLIENT_ID / CF_ACCESS_CLIENT_SECRET — Cloudflare Access service
|
|
16
16
|
token, required only when the host sits behind CF Access (e.g. staging)
|
|
@@ -47,7 +47,7 @@ _client = None
|
|
|
47
47
|
def _get_client():
|
|
48
48
|
"""Lazily build (and cache) the EverestAPI SDK client.
|
|
49
49
|
|
|
50
|
-
Reads ``
|
|
50
|
+
Reads ``EIQ_API_KEY`` (or legacy ``EVEREST_API_KEY``) and ``EIQ_BASE_URL`` (or
|
|
51
51
|
``EVEREST_API_URL``) from the environment. Cloudflare Access service tokens
|
|
52
52
|
(``CF_ACCESS_CLIENT_ID`` / ``CF_ACCESS_CLIENT_SECRET``) are honoured by the
|
|
53
53
|
EverestAPI constructor, so a host behind CF Access (e.g. staging) works
|
|
@@ -57,14 +57,14 @@ def _get_client():
|
|
|
57
57
|
if _client is None:
|
|
58
58
|
from everestapi import EverestAPI
|
|
59
59
|
|
|
60
|
-
api_key = os.environ.get("
|
|
60
|
+
api_key = os.environ.get("EIQ_API_KEY") or os.environ.get("EVEREST_API_KEY", "")
|
|
61
61
|
base_url = (
|
|
62
62
|
os.environ.get("EIQ_BASE_URL")
|
|
63
63
|
or os.environ.get("EVEREST_API_URL")
|
|
64
64
|
or "https://everestquant.ai"
|
|
65
65
|
)
|
|
66
66
|
if not api_key:
|
|
67
|
-
raise RuntimeError("
|
|
67
|
+
raise RuntimeError("EIQ_API_KEY environment variable is required")
|
|
68
68
|
# EverestAPI reads CF_ACCESS_CLIENT_ID/SECRET from the environment in its
|
|
69
69
|
# own constructor, so staging (behind Cloudflare Access) works with no
|
|
70
70
|
# extra wiring here.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: everestapi
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Python SDK for the EverestQuant prediction tournament platform
|
|
5
5
|
Author-email: EverestQuant <engineering@everestquant.ai>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -59,7 +59,7 @@ api.submit_futures_predictions(
|
|
|
59
59
|
scores = api.get_scores(model_id="my-model", days=30)
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
Or set `
|
|
62
|
+
Or set `EIQ_API_KEY` as an environment variable and omit the constructor argument.
|
|
63
63
|
|
|
64
64
|
> **Handling your API key.** Shell history, terminal recordings, and CI logs may persist any value you `echo` or `print`. Copy the key via the clipboard rather than echoing it in a recorded session, and prefer storing it in a secrets manager or `.env` file (gitignored) over inlining in source.
|
|
65
65
|
|
|
@@ -17,6 +17,7 @@ from everestapi.cli import cli
|
|
|
17
17
|
def runner(monkeypatch):
|
|
18
18
|
monkeypatch.setattr("everestapi.client.EverestAPI.DEFAULT_BASE_URL", "http://test")
|
|
19
19
|
monkeypatch.setenv("EVEREST_API_KEY", "eiq_test_key")
|
|
20
|
+
monkeypatch.delenv("EIQ_API_KEY", raising=False)
|
|
20
21
|
monkeypatch.delenv("EIQ_BASIC_AUTH_USER", raising=False)
|
|
21
22
|
monkeypatch.delenv("EIQ_BASIC_AUTH_PASS", raising=False)
|
|
22
23
|
return CliRunner()
|
|
@@ -16,6 +16,7 @@ from everestapi import EverestAPI, EverestError
|
|
|
16
16
|
def api(monkeypatch):
|
|
17
17
|
for var in (
|
|
18
18
|
"EVEREST_API_URL",
|
|
19
|
+
"EIQ_API_KEY",
|
|
19
20
|
"EVEREST_API_KEY",
|
|
20
21
|
"EIQ_BASIC_AUTH_USER",
|
|
21
22
|
"EIQ_BASIC_AUTH_PASS",
|
|
@@ -31,6 +32,7 @@ def test_api_key_header_set(httpx_mock, api):
|
|
|
31
32
|
|
|
32
33
|
|
|
33
34
|
def test_empty_api_key_omits_header(httpx_mock, monkeypatch):
|
|
35
|
+
monkeypatch.delenv("EIQ_API_KEY", raising=False)
|
|
34
36
|
monkeypatch.delenv("EVEREST_API_KEY", raising=False)
|
|
35
37
|
client = EverestAPI(base_url="http://test")
|
|
36
38
|
httpx_mock.add_response(url="http://test/api/v1/health", json={"status": "ok"})
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|