Python SDK for Therminal — Kalshi temperature prediction markets + NWS weather data
Project description
therminal-py
Python SDK for Therminal — Kalshi temperature prediction markets + NWS weather data.
Install
pip install therminal-py # core (returns dicts)
pip install therminal-py[pandas] # + DataFrame support
pip install therminal-py[ml] # + scikit-learn ML features
pip install therminal-py[cli] # + CLI tool
pip install therminal-py[all] # pandas + ml + cli
Quick Start
from therminal import TherminalClient
client = TherminalClient()
# Get candles as a Pandas DataFrame
df = client.candles(
market="KXHIGHNY-26MAR20-T50",
from_date="2026-03-01",
interval=5,
as_dataframe=True,
)
# Get NYC weather observations in metric units
obs = client.observations(station="NYC", units="metric", limit=10)
# Get 1-minute ASOS observations (integer °C)
omo = client.observations(station="ATL", resolution="1min", from_date="2025-01-01", limit=100)
ML Features (scikit-learn)
pip install therminal-py[ml]
from therminal.ml import WeatherFeatures
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import StandardScaler
from sklearn.ensemble import GradientBoostingRegressor
# WeatherFeatures is a scikit-learn Transformer
# Input: dates → Output: feature matrix (X)
# Target (y) is your responsibility
pipe = make_pipeline(
WeatherFeatures(station="ATL", sources=["omo", "metar"], lookback_hours=24),
StandardScaler(),
GradientBoostingRegressor(),
)
pipe.fit(dates_train, y_train)
pipe.predict(dates_test)
# Configurable: sources, lookback window, aggregations, calendar features
wf = WeatherFeatures(
station="ATL",
sources=["omo", "metar"],
lookback_hours=48,
omo_aggs=("min", "max", "mean", "std", "range"),
include_calendar=True,
)
X = wf.fit_transform(dates)
wf.get_feature_names_out() # ['omo_temp_c_mean_48h', 'metar_temp_f_last_48h', ...]
Documentation
Full API reference with interactive playground: docs.mostlyright.xyz
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file therminal_py-1.0.0.tar.gz.
File metadata
- Download URL: therminal_py-1.0.0.tar.gz
- Upload date:
- Size: 45.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8388566093c0696032db6215c7ae2ece6753943245ca8a0f132cfc8642798c3c
|
|
| MD5 |
2582b3612558bbe9919d04fa5ff88e7c
|
|
| BLAKE2b-256 |
495f38f4bd782714ed07802c6702c0d67f103e5e310041035e3ef4b206bb7171
|
Provenance
The following attestation bundles were made for therminal_py-1.0.0.tar.gz:
Publisher:
publish.yml on Tarabcak/therminal-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
therminal_py-1.0.0.tar.gz -
Subject digest:
8388566093c0696032db6215c7ae2ece6753943245ca8a0f132cfc8642798c3c - Sigstore transparency entry: 1195379117
- Sigstore integration time:
-
Permalink:
Tarabcak/therminal-py@a293bf1d5b8c8b2eefc115ba082900b8937a49ed -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Tarabcak
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a293bf1d5b8c8b2eefc115ba082900b8937a49ed -
Trigger Event:
push
-
Statement type:
File details
Details for the file therminal_py-1.0.0-py3-none-any.whl.
File metadata
- Download URL: therminal_py-1.0.0-py3-none-any.whl
- Upload date:
- Size: 36.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4bd2389f6853c96e328edccd1b06dda0e718e026187107c229ce6f3084074f62
|
|
| MD5 |
3694a51bf4badea121a5b64ab4227902
|
|
| BLAKE2b-256 |
7c58ff97d4f372fc31fd8ed341ff2b3c37dec2cabc65dd9b63eba65c61fe6595
|
Provenance
The following attestation bundles were made for therminal_py-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on Tarabcak/therminal-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
therminal_py-1.0.0-py3-none-any.whl -
Subject digest:
4bd2389f6853c96e328edccd1b06dda0e718e026187107c229ce6f3084074f62 - Sigstore transparency entry: 1195379220
- Sigstore integration time:
-
Permalink:
Tarabcak/therminal-py@a293bf1d5b8c8b2eefc115ba082900b8937a49ed -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Tarabcak
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a293bf1d5b8c8b2eefc115ba082900b8937a49ed -
Trigger Event:
push
-
Statement type: