everestapi 0.1.2__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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 EverestQuant
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,186 @@
1
+ Metadata-Version: 2.4
2
+ Name: everestapi
3
+ Version: 0.1.2
4
+ Summary: Python SDK for the EverestQuant prediction tournament platform
5
+ Author-email: EverestQuant <engineering@everestquant.ai>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://everestquant.ai
8
+ Project-URL: Documentation, https://docs.everestquant.ai
9
+ Project-URL: Repository, https://github.com/everestquant/everestapi-public
10
+ Keywords: quant,tournament,prediction,staking,machine-learning
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: httpx>=0.27.0
23
+ Requires-Dist: click>=8.0
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest>=8.0; extra == "dev"
26
+ Requires-Dist: pytest-httpx>=0.34.0; extra == "dev"
27
+ Dynamic: license-file
28
+
29
+ # everestapi
30
+
31
+ Python SDK for the [EverestQuant](https://everestquant.ai) prediction tournament platform.
32
+
33
+ ```bash
34
+ pip install everestapi
35
+ ```
36
+
37
+ ## Quickstart
38
+
39
+ ```python
40
+ from everestapi import EverestAPI
41
+
42
+ api = EverestAPI(api_key="eiq_your_key")
43
+
44
+ # Browse the universe
45
+ universe = api.get_universe()
46
+
47
+ # Download training data
48
+ api.download_dataset(universe="futures", split="train", output_path="train.parquet")
49
+
50
+ # Submit predictions
51
+ api.submit_futures_predictions(
52
+ model_id="my-model",
53
+ predictions={"instrument_a": 0.5, "instrument_b": -0.3},
54
+ )
55
+
56
+ # Check scores
57
+ scores = api.get_scores(model_id="my-model", days=30)
58
+ ```
59
+
60
+ Or set `EVEREST_API_KEY` as an environment variable and omit the constructor argument.
61
+
62
+ > **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.
63
+
64
+ ## Two tournaments
65
+
66
+ | Tournament | Universe | Features | Frequency |
67
+ |------------|----------|----------|-----------|
68
+ | **Alps** (Equities) | Large-cap equities | Obfuscated fundamental + technical | Daily |
69
+ | **Himalayas** (Futures) | Global futures | Obfuscated cross-sectional + macro | Weekly |
70
+
71
+ ```python
72
+ # Equities
73
+ api = EverestAPI(api_key="...", tournament="equities")
74
+ api.submit_predictions(model_id="my-eq-model", predictions=[...])
75
+
76
+ # Futures
77
+ api = EverestAPI(api_key="...", tournament="futures")
78
+ api.submit_futures_predictions(model_id="my-fut-model", predictions={...})
79
+ ```
80
+
81
+ ## Key features
82
+
83
+ ### Submitting from a file
84
+
85
+ Both Parquet and CSV are accepted. **Parquet is recommended** — float precision round-trips cleanly, files compress well, and it matches the format the SDK serves to you (`download_dataset` returns parquet).
86
+
87
+ ```python
88
+ api.submit_predictions_file(
89
+ model_name="my-model",
90
+ file_path="predictions.parquet", # or "predictions.csv"
91
+ tournament="equities",
92
+ )
93
+ ```
94
+
95
+ The file must have `ticker` (str) and `score` (float in `[-1, 1]`) columns, one row per universe instrument.
96
+
97
+ From the CLI:
98
+
99
+ ```bash
100
+ everestapi submit --model my-model --file predictions.parquet
101
+ ```
102
+
103
+ ### Data & diagnostics
104
+
105
+ ```python
106
+ api.download_dataset(universe="futures", split="train")
107
+ api.download_benchmark(universe="futures", split="validation")
108
+ api.get_dataset_info(universe="futures")
109
+ api.get_diagnostics(model_id="my-model")
110
+ api.submit_validation_diagnostics(model_id="my-model", predictions=df)
111
+ ```
112
+
113
+ ### Serverless compute
114
+
115
+ ```python
116
+ # Tier 1 — quick-train with built-in templates
117
+ job = api.quick_train(model="lightgbm", features="small", target="target_everest_20")
118
+
119
+ # Tier 2 — custom script on GPU
120
+ job = api.custom_train(script_path="train.py", gpu="A100", max_hours=2.0)
121
+
122
+ # Wait and download
123
+ result = api.wait_for_job(job["job_id"])
124
+ api.download_model(job["job_id"], output_path="model.pkl")
125
+ ```
126
+
127
+ > **Pickle safety.** Trained models are returned as pickle files. `pickle.load` is RCE-equivalent: only load `.pkl` files from compute jobs you initiated yourself. Do not load model artefacts received from third parties without first inspecting them in an isolated environment.
128
+
129
+ ### Staking (USDC)
130
+
131
+ ```python
132
+ api.stake(model_id="my-model", amount_usdc=100.0, wallet_address="0x...")
133
+ api.get_stake_balance(model_id="my-model")
134
+ api.claim_payout(model_id="my-model", round_id="42")
135
+ ```
136
+
137
+ ### Local evaluation
138
+
139
+ ```python
140
+ import pandas as pd
141
+
142
+ val = pd.read_parquet("futures_validation.parquet")
143
+ metrics = EverestAPI.evaluate(predictions, val, target="target_everest_20")
144
+ print(metrics) # {"simple_corr": 0.023, "weighted_corr": 0.019, "per_difficulty": {...}}
145
+ ```
146
+
147
+ ### CLI
148
+
149
+ ```bash
150
+ everestapi health
151
+ everestapi universe
152
+ everestapi submit --model my-model --file predictions.parquet # or .csv
153
+ ```
154
+
155
+ ## Registration
156
+
157
+ No API key needed to register:
158
+
159
+ ```python
160
+ result = EverestAPI().register(name="my-agent", email="agent@example.com")
161
+ print(result["api_key"]) # shown once — save it
162
+ ```
163
+
164
+ ## Context manager
165
+
166
+ ```python
167
+ with EverestAPI(api_key="...") as api:
168
+ universe = api.get_universe()
169
+ # connection pool cleaned up on exit
170
+ ```
171
+
172
+ ## Requirements
173
+
174
+ - Python 3.10+
175
+ - httpx >= 0.27
176
+
177
+ ## Disclaimers
178
+
179
+ - **Not financial advice.** EverestQuant tournaments are prediction competitions. Nothing in this SDK or on the platform constitutes investment advice, a solicitation, or a recommendation to buy or sell any financial instrument.
180
+ - **Testnet / beta.** The staking system and compute platform are in beta. Smart contract addresses, API endpoints, and payout mechanics may change without notice.
181
+ - **API stability.** This SDK targets API v1. Breaking changes will be communicated via the platform changelog and will follow semver once the SDK reaches 1.0.
182
+ - **Data is obfuscated.** All features and instrument identifiers served by the API are obfuscated. Attempting to reverse-engineer or de-obfuscate data violates the platform terms of service.
183
+
184
+ ## License
185
+
186
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,158 @@
1
+ # everestapi
2
+
3
+ Python SDK for the [EverestQuant](https://everestquant.ai) prediction tournament platform.
4
+
5
+ ```bash
6
+ pip install everestapi
7
+ ```
8
+
9
+ ## Quickstart
10
+
11
+ ```python
12
+ from everestapi import EverestAPI
13
+
14
+ api = EverestAPI(api_key="eiq_your_key")
15
+
16
+ # Browse the universe
17
+ universe = api.get_universe()
18
+
19
+ # Download training data
20
+ api.download_dataset(universe="futures", split="train", output_path="train.parquet")
21
+
22
+ # Submit predictions
23
+ api.submit_futures_predictions(
24
+ model_id="my-model",
25
+ predictions={"instrument_a": 0.5, "instrument_b": -0.3},
26
+ )
27
+
28
+ # Check scores
29
+ scores = api.get_scores(model_id="my-model", days=30)
30
+ ```
31
+
32
+ Or set `EVEREST_API_KEY` as an environment variable and omit the constructor argument.
33
+
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
+
36
+ ## Two tournaments
37
+
38
+ | Tournament | Universe | Features | Frequency |
39
+ |------------|----------|----------|-----------|
40
+ | **Alps** (Equities) | Large-cap equities | Obfuscated fundamental + technical | Daily |
41
+ | **Himalayas** (Futures) | Global futures | Obfuscated cross-sectional + macro | Weekly |
42
+
43
+ ```python
44
+ # Equities
45
+ api = EverestAPI(api_key="...", tournament="equities")
46
+ api.submit_predictions(model_id="my-eq-model", predictions=[...])
47
+
48
+ # Futures
49
+ api = EverestAPI(api_key="...", tournament="futures")
50
+ api.submit_futures_predictions(model_id="my-fut-model", predictions={...})
51
+ ```
52
+
53
+ ## Key features
54
+
55
+ ### Submitting from a file
56
+
57
+ Both Parquet and CSV are accepted. **Parquet is recommended** — float precision round-trips cleanly, files compress well, and it matches the format the SDK serves to you (`download_dataset` returns parquet).
58
+
59
+ ```python
60
+ api.submit_predictions_file(
61
+ model_name="my-model",
62
+ file_path="predictions.parquet", # or "predictions.csv"
63
+ tournament="equities",
64
+ )
65
+ ```
66
+
67
+ The file must have `ticker` (str) and `score` (float in `[-1, 1]`) columns, one row per universe instrument.
68
+
69
+ From the CLI:
70
+
71
+ ```bash
72
+ everestapi submit --model my-model --file predictions.parquet
73
+ ```
74
+
75
+ ### Data & diagnostics
76
+
77
+ ```python
78
+ api.download_dataset(universe="futures", split="train")
79
+ api.download_benchmark(universe="futures", split="validation")
80
+ api.get_dataset_info(universe="futures")
81
+ api.get_diagnostics(model_id="my-model")
82
+ api.submit_validation_diagnostics(model_id="my-model", predictions=df)
83
+ ```
84
+
85
+ ### Serverless compute
86
+
87
+ ```python
88
+ # Tier 1 — quick-train with built-in templates
89
+ job = api.quick_train(model="lightgbm", features="small", target="target_everest_20")
90
+
91
+ # Tier 2 — custom script on GPU
92
+ job = api.custom_train(script_path="train.py", gpu="A100", max_hours=2.0)
93
+
94
+ # Wait and download
95
+ result = api.wait_for_job(job["job_id"])
96
+ api.download_model(job["job_id"], output_path="model.pkl")
97
+ ```
98
+
99
+ > **Pickle safety.** Trained models are returned as pickle files. `pickle.load` is RCE-equivalent: only load `.pkl` files from compute jobs you initiated yourself. Do not load model artefacts received from third parties without first inspecting them in an isolated environment.
100
+
101
+ ### Staking (USDC)
102
+
103
+ ```python
104
+ api.stake(model_id="my-model", amount_usdc=100.0, wallet_address="0x...")
105
+ api.get_stake_balance(model_id="my-model")
106
+ api.claim_payout(model_id="my-model", round_id="42")
107
+ ```
108
+
109
+ ### Local evaluation
110
+
111
+ ```python
112
+ import pandas as pd
113
+
114
+ val = pd.read_parquet("futures_validation.parquet")
115
+ metrics = EverestAPI.evaluate(predictions, val, target="target_everest_20")
116
+ print(metrics) # {"simple_corr": 0.023, "weighted_corr": 0.019, "per_difficulty": {...}}
117
+ ```
118
+
119
+ ### CLI
120
+
121
+ ```bash
122
+ everestapi health
123
+ everestapi universe
124
+ everestapi submit --model my-model --file predictions.parquet # or .csv
125
+ ```
126
+
127
+ ## Registration
128
+
129
+ No API key needed to register:
130
+
131
+ ```python
132
+ result = EverestAPI().register(name="my-agent", email="agent@example.com")
133
+ print(result["api_key"]) # shown once — save it
134
+ ```
135
+
136
+ ## Context manager
137
+
138
+ ```python
139
+ with EverestAPI(api_key="...") as api:
140
+ universe = api.get_universe()
141
+ # connection pool cleaned up on exit
142
+ ```
143
+
144
+ ## Requirements
145
+
146
+ - Python 3.10+
147
+ - httpx >= 0.27
148
+
149
+ ## Disclaimers
150
+
151
+ - **Not financial advice.** EverestQuant tournaments are prediction competitions. Nothing in this SDK or on the platform constitutes investment advice, a solicitation, or a recommendation to buy or sell any financial instrument.
152
+ - **Testnet / beta.** The staking system and compute platform are in beta. Smart contract addresses, API endpoints, and payout mechanics may change without notice.
153
+ - **API stability.** This SDK targets API v1. Breaking changes will be communicated via the platform changelog and will follow semver once the SDK reaches 1.0.
154
+ - **Data is obfuscated.** All features and instrument identifiers served by the API are obfuscated. Attempting to reverse-engineer or de-obfuscate data violates the platform terms of service.
155
+
156
+ ## License
157
+
158
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,44 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "everestapi"
7
+ dynamic = ["version"]
8
+ description = "Python SDK for the EverestQuant prediction tournament platform"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.10"
12
+ authors = [{ name = "EverestQuant", email = "engineering@everestquant.ai" }]
13
+ keywords = ["quant", "tournament", "prediction", "staking", "machine-learning"]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Intended Audience :: Developers",
17
+ "Intended Audience :: Science/Research",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.10",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
23
+ ]
24
+ dependencies = [
25
+ "httpx>=0.27.0",
26
+ "click>=8.0",
27
+ ]
28
+
29
+ [project.optional-dependencies]
30
+ dev = ["pytest>=8.0", "pytest-httpx>=0.34.0"]
31
+
32
+ [project.scripts]
33
+ everestapi = "everestapi.cli:cli"
34
+
35
+ [project.urls]
36
+ Homepage = "https://everestquant.ai"
37
+ Documentation = "https://docs.everestquant.ai"
38
+ Repository = "https://github.com/everestquant/everestapi-public"
39
+
40
+ [tool.setuptools.packages.find]
41
+ where = ["src"]
42
+
43
+ [tool.setuptools.dynamic]
44
+ version = {attr = "everestapi.__version__"}
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,32 @@
1
+ """EverestAPI — Python SDK for the EverestQuant prediction tournament platform."""
2
+
3
+ __version__ = "0.1.2"
4
+
5
+ from everestapi.client import EverestAPI, EverestError
6
+ from everestapi.types import (
7
+ FeatureResponse,
8
+ Instrument,
9
+ LeaderboardEntry,
10
+ LeaderboardResponse,
11
+ Score,
12
+ ScoresResponse,
13
+ StakeBalance,
14
+ StakeResponse,
15
+ Submission,
16
+ UniverseResponse,
17
+ )
18
+
19
+ __all__ = [
20
+ "EverestAPI",
21
+ "EverestError",
22
+ "FeatureResponse",
23
+ "Instrument",
24
+ "LeaderboardEntry",
25
+ "LeaderboardResponse",
26
+ "Score",
27
+ "ScoresResponse",
28
+ "StakeBalance",
29
+ "StakeResponse",
30
+ "Submission",
31
+ "UniverseResponse",
32
+ ]
@@ -0,0 +1,5 @@
1
+ """Allow running as ``python -m everestapi``."""
2
+
3
+ from everestapi.cli import cli
4
+
5
+ cli()