HYROX race data client – retrieve full race results via Python
Project description
pyrox-client
Unofficial Python client for HYROX race results.
Install
uv pip install pyrox-client
or
pip install pyrox-client
Reporting helpers that read the generated DuckDB database are optional:
pip install "pyrox-client[reporting]"
Quickstart
import pyrox
client = pyrox.PyroxClient()
# Discover races
races = client.list_races()
seasons = client.list_seasons()
locations = client.list_locations(season=8)
years = client.list_years(season=8, location="london")
# Fetch one race
london = client.get_race(season=7, location="london")
# Optional filters
london_male_open = client.get_race(
season=7,
location="london",
gender="male",
division="open",
)
# Total time filter in minutes
sub60 = client.get_race(season=7, location="london", total_time=60)
range_50_60 = client.get_race(season=7, location="london", total_time=(50, 60))
# Athlete lookup in a race
athlete = client.get_athlete_in_race(
season=7,
location="london",
athlete_name="surname, name",
)
Core API
list_races(season: int | None = None, force_refresh: bool = False) -> pd.DataFramelist_seasons(force_refresh: bool = False) -> list[int]list_locations(season: int | None = None, force_refresh: bool = False) -> list[str]list_years(season: int | None = None, location: str | None = None, force_refresh: bool = False) -> list[int]get_race(season, location, year=None, gender=None, division=None, total_time=None, use_cache=True) -> pd.DataFrameget_season(season, locations=None, gender=None, division=None, max_workers=8, use_cache=True) -> pd.DataFrameget_athlete_in_race(season, location, athlete_name, year=None, gender=None, division=None, use_cache=True) -> pd.DataFrameclear_cache(pattern="*") -> Nonecache_info() -> dict
Mistake Recovery
RaceNotFound includes manifest-backed suggestions when a race cannot be found:
from pyrox.errors import RaceNotFound
try:
client.get_race(season=8, location="londn")
except RaceNotFound as exc:
print(exc)
print(exc.suggestions)
Reporting Helpers
The base install keeps the public client lightweight. Install the reporting extra
before using ReportingClient:
from pyrox.reporting import ReportingClient
Documentation
- Live docs: https://vmatei2.github.io/pyrox-client/
- Client API:
docs/api.md - Error model:
docs/errors.md - Filters and usage notes:
docs/filters.md
Repository Scope
The PyPI package is the pyrox client library.
This repository also contains a reporting service and UI (pyrox_api_service/, ui/) used for project workflows. Those are not part of the published pyrox-client wheel.
Reporting-service contract note:
- Athlete profile endpoints (
/api/athletes/profileand/api/athletes/{athlete_id}/profile) may include optionalpersonal_bests[*].percentilevalues in[0, 1]. average_times[*].percentilemay also be present with the same semantics.- Missing percentile data is non-fatal and returned by omitting the
percentilekey for that segment. - Profile percentile cohorts are computed against historical results in the same division and gender.
Maintainer-only operational docs:
docs/maintainers/README.mddocs/maintainers/release.mddocs/maintainers/reporting-service.md
Disclaimer
Pyrox is an independent project and is not affiliated with, endorsed, or sponsored by HYROX. HYROX and related marks are trademarks of their respective owners and are used only for descriptive purposes.
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 pyrox_client-0.2.4.tar.gz.
File metadata
- Download URL: pyrox_client-0.2.4.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d247955656bee2891808510e7145c3f0a5bbdd184ceb4e9d5ac53efb527aa39
|
|
| MD5 |
9362fc991fe8ae160dfaa55c21c56889
|
|
| BLAKE2b-256 |
8360b1fe5affeceb07d9f0203dd9080485f95d9930a349a8ce5628e0fc548580
|
Provenance
The following attestation bundles were made for pyrox_client-0.2.4.tar.gz:
Publisher:
release.yml on vmatei2/pyrox-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrox_client-0.2.4.tar.gz -
Subject digest:
6d247955656bee2891808510e7145c3f0a5bbdd184ceb4e9d5ac53efb527aa39 - Sigstore transparency entry: 1417671247
- Sigstore integration time:
-
Permalink:
vmatei2/pyrox-client@1ba4ed19d1eb7e66506bc97ccc55892e99ec4401 -
Branch / Tag:
refs/tags/v0.2.4 - Owner: https://github.com/vmatei2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1ba4ed19d1eb7e66506bc97ccc55892e99ec4401 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyrox_client-0.2.4-py3-none-any.whl.
File metadata
- Download URL: pyrox_client-0.2.4-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8304f696ff8811ae5fddd8f58de14f978cc406c8e9f5b16e4ebfc3777f6c4691
|
|
| MD5 |
6830ca9949f2cf3133199498b087835a
|
|
| BLAKE2b-256 |
3bcf7627415cc751b1eccbf6a4547abeb2bda6d3ae2429872f61425a6ed8a8fb
|
Provenance
The following attestation bundles were made for pyrox_client-0.2.4-py3-none-any.whl:
Publisher:
release.yml on vmatei2/pyrox-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrox_client-0.2.4-py3-none-any.whl -
Subject digest:
8304f696ff8811ae5fddd8f58de14f978cc406c8e9f5b16e4ebfc3777f6c4691 - Sigstore transparency entry: 1417671254
- Sigstore integration time:
-
Permalink:
vmatei2/pyrox-client@1ba4ed19d1eb7e66506bc97ccc55892e99ec4401 -
Branch / Tag:
refs/tags/v0.2.4 - Owner: https://github.com/vmatei2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1ba4ed19d1eb7e66506bc97ccc55892e99ec4401 -
Trigger Event:
push
-
Statement type: