strength-utils
Please note that this package is undergoing regular changes.
Typed utilities for strength training and programming.
Features
- Multiple 1RM estimation formulas (Epley, Brzycki, Lombardi, Mayhew).
- Predict training weight at target reps or RPE.
- RPE ↔ %1RM tables (with interpolation).
- Volume/tonnage calculations per exercise and per session.
- Basic progression helpers (linear, double progression, RIR-based).
- Simple templated programs (e.g., 5x5, PPL) as typed data models.
- Unit conversion utilities (kg/lb).
- 100% type-hinted code.
- SQL persistence for workouts and session plans (SQLite by default, PostgreSQL-ready).
Quickstart
from strength_utils import estimate_1rm, predict_weight_for_reps, rpe_to_percent
one_rm = estimate_1rm(weight=140.0, reps=5, method="epley") # ~163.3 kg
target = predict_weight_for_reps(one_rm, reps=3, rpe=9.0) # planned training weight
print(one_rm, target)
License
MIT
Percent tables per lift
from strength_utils import make_percent_table_by_lift
tables = make_percent_table_by_lift({"Back Squat": 180.0, "Bench Press": 120.0})
print(tables["Back Squat"][0.8]) # -> 1RM * 0.8 rounded to nearest 2.5 kg
Program generators (PPL & 5x5)
from strength_utils import program_ppl, program_5x5
ppl = program_ppl() # 3-day template
five = program_5x5(weeks=4) # 12 sessions (3 per week)
for s in ppl:
print(s.day, s.workout.name, len(s.workout.prescriptions))
SQL storage
from strength_utils import StrengthDatabase, plan_workout
from strength_utils import Exercise, SetPrescription, SetScheme, SessionPlan, Workout
db = StrengthDatabase() # sqlite:///strength_utils.db by default
squat = Exercise("Back Squat", ("quads", "glutes"))
presc = SetPrescription(squat, sets=5, scheme=SetScheme(reps=5, rpe=8.0))
workout = Workout("Heavy Day", [presc])
db.store_workout(workout)
plan = plan_workout(workout, {"Back Squat": 180.0})
session = SessionPlan(day="2024-01-01", workout=workout)
db.store_session_plan(session, plan)
# Retrieve later
saved_session, saved_plan = db.get_session_plan("2024-01-01")
# Supply a PostgreSQL URL when needed:
# db = StrengthDatabase(url="postgresql+psycopg://user:pass@host/dbname")
Metadata
Release files for strength-utils 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| strength_utils-0.1.1.tar.gz | 19.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| strength_utils-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.4 kB
Release files / strength_utils-0.1.1.tar.gz
| Download URL | strength_utils-0.1.1.tar.gz |
|---|---|
| Size | 19.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27cc563ed5d99e351945ee90a343c033ba37612a47bbead676f7b0982a482a6e
|
|
BLAKE2b-256 checksum How to use checksums |
71935e286430128a566c8a8d2672d6ccc8762fd36bbc48591c69a6681fd35b5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.5
|
Release files / strength_utils-0.1.1-py3-none-any.whl
| Download URL | strength_utils-0.1.1-py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d4210693095b740ee278a04b6c64c90535c4684180c796a17d49ce7ff37fe2c6
|
|
BLAKE2b-256 checksum How to use checksums |
0bfce36b8088df7d330dd561e9b0eca6adb6b48f7bd40e7b7ec8d88d37e6086c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.5
|