Skip to content

remuzel/hevy-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hevy API

This Python module is a lightweight wrapper around the Hevy API. From their website:

Welcome to Hevy's public API! We're just starting to roll this out and depending on your feedback, we'll be adding more features and endpoints. Also, we make no guarantees that we won't completely change the structure or abandon the project entirely so use it at your own risk.

That being said, please open an issue if you see any feature drifts between this and the official docs.

This Python client was initially destined to support an MCP Server for Hevy, but the amazing @chrisdoc beat me to it! Check it out on Github or Smithery:

GitHub smithery badge

Installation

For development

uv sync --dev && uv pip install -e .

For use

uv add git+https://github.com/remuzel/polarsteps-api.git

API Key

Currently, the Hevy API is only made available to Hevy Pro users (via an API key), and hence so is this module.

You can get your key at https://hevy.com/settings?developer and set it as an environment variable:

export HEVY_API_KEY='your_api_key'

Quick Start

from hevy_api.client import HevyClient
from hevy_api.models.model import Workout

# Initialize the client
client = HevyClient()

# Example Workout
last_workout: Workout | None = (client.get_workouts().workouts or [None])[-1]
if last_workout is None:
    exit("Could not find workouts.")
print(last_workout.summary)

About

A Python Client to interact with the Hevy API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published