Skip to main content

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.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for strength-utils 0.1.2
File Size Uploaded
strength_utils-0.1.2.tar.gz 19.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for strength-utils 0.1.2
File Interpreter ABI Platform
strength_utils-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 32.5 kB

Release files / strength_utils-0.1.2.tar.gz

Download URL strength_utils-0.1.2.tar.gz
Size 19.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4cfd4e43928be828b5b2a4d3a0c29fa45da8d1dfe4fc1365eb15e87c5a623acd
BLAKE2b-256 checksum
How to use checksums
d27fd94048332dac07d3c1d7c18cfba90bff59b824e301f00906c775e400815d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.5

Release files / strength_utils-0.1.2-py3-none-any.whl

Download URL strength_utils-0.1.2-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf7e809b5dad34ae27ada435919dbae00f9e04b2b8728c326b1f34c4cad2b4e4
BLAKE2b-256 checksum
How to use checksums
b61fe0be8a94fb08cb8e610444dcc2a6f6d6c7b2b17a03ab88e316e3648ebe7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.5

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page