A typed Python SDK for working with OpenPowerlifting data
Project description
opl-py
A typed Python SDK for working with OpenPowerlifting data. Query lifters, meets, and rankings from a local DuckDB database built from the official OpenPowerlifting bulk CSV. Includes optional ML-based trajectory prediction analytics module.
0. Installation
pip install opl-py
For analytics features (trajectory prediction, percentile rankings):
pip install opl-py[analytics]
For dev features (type-checking, testing, linting, formatting, publishing):
pip install opl-py[dev]
1. Quick Start
Download and ingest the full OPL dataset (~250 MB) into a local DuckDB file:
opl init
Then query it from Python:
import opl
client = opl.OPL()
# Look up a lifter
lifter = client.lifter("Ray Williams #1")
print(lifter.best_total_kg) # 1104.5
print(lifter.competition_count) # 30
for entry in lifter.history():
print(f"{entry.date}: {entry.total_kg}kg @ {entry.bodyweight_kg}kg")
# Query rankings
top_raw = client.rankings(
sex=opl.Sex.MALE,
equipment=opl.Equipment.RAW,
event=opl.Event.SBD,
weight_class="93",
order_by="dots",
limit=10,
)
# Raw SQL for custom queries
results = client.query(
"SELECT Federation, COUNT(*) as n FROM entries GROUP BY Federation ORDER BY n DESC LIMIT 10"
)
Documentation
| Guide | Description |
|---|---|
| CLI | Command-line interface — opl init, opl update, opl info |
| SDK | Python client, models, and enums |
| Analytics | Percentile rankings, feature extraction, trajectory prediction |
| Development | Local setup, linting, testing, Make targets |
Attribution
This project uses data from the OpenPowerlifting project. OpenPowerlifting data is contributed to the public domain.
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 opl_py-0.1.0.tar.gz.
File metadata
- Download URL: opl_py-0.1.0.tar.gz
- Upload date:
- Size: 935.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
632c8b64f3de57de401260faa1000c2e9127fdab9039d180f05b633b90e292d0
|
|
| MD5 |
e81402d43ee7d7dec7e28eedd151e6bc
|
|
| BLAKE2b-256 |
4d13b55081d53ec1784f23b4f065ef4e2f32922accc95af6a338fca550b4dc3d
|
Provenance
The following attestation bundles were made for opl_py-0.1.0.tar.gz:
Publisher:
publish.yml on yaq1n0/opl-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opl_py-0.1.0.tar.gz -
Subject digest:
632c8b64f3de57de401260faa1000c2e9127fdab9039d180f05b633b90e292d0 - Sigstore transparency entry: 1121983331
- Sigstore integration time:
-
Permalink:
yaq1n0/opl-py@06b6b1d01c67a66c34e4928ec443d4c1c49db7a1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/yaq1n0
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@06b6b1d01c67a66c34e4928ec443d4c1c49db7a1 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file opl_py-0.1.0-py3-none-any.whl.
File metadata
- Download URL: opl_py-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.7 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 |
eb136e0daa6f9332d20902f4d1591828bd0a6e3a3c02a00c3dfbdf6db77b4641
|
|
| MD5 |
8fdcf277920d3ae5e01e5f045150be86
|
|
| BLAKE2b-256 |
43d57bcfa829bd365258b3a7bcc1060fbb0954fc48507174768cbbc25fdf3e18
|
Provenance
The following attestation bundles were made for opl_py-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on yaq1n0/opl-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opl_py-0.1.0-py3-none-any.whl -
Subject digest:
eb136e0daa6f9332d20902f4d1591828bd0a6e3a3c02a00c3dfbdf6db77b4641 - Sigstore transparency entry: 1121983433
- Sigstore integration time:
-
Permalink:
yaq1n0/opl-py@06b6b1d01c67a66c34e4928ec443d4c1c49db7a1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/yaq1n0
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@06b6b1d01c67a66c34e4928ec443d4c1c49db7a1 -
Trigger Event:
workflow_run
-
Statement type: