Skip to main content

Simple API client for interacting with the OrangeTheory Fitness APIs.

Review the documentation.

This library allows access to the OrangeTheory API to retrieve workouts and performance data, class schedules, studio information, and bookings.

Installation

pip install otf-api

Overview

To use the API, you need to create an instance of the Otf class. This will authenticate you with the API and allow you to make requests. When the Otf object is created it automatically grabs your member details and home studio, to simplify the process of making requests.

You can either pass an OtfUser object to the OtfClass or you can pass nothing and allow it to prompt you for your username and password.

You can also export environment variables OTF_EMAIL and OTF_PASSWORD to get these from the environment.

from otf_api import Otf, OtfUser

otf = Otf()

# OR

otf = Otf(user=OtfUser(<email_address>,<password>))

OpenAPI Schema

This library generates OpenAPI 3.0.3 schema files from its Pydantic models, providing a machine-readable representation of the API structure and data models. These schemas are automatically generated during the build process and are available as build artifacts.

What's Generated

The OpenAPI schema includes:

  • All public Pydantic models from the otf_api.models module
  • Complete type definitions with field descriptions and constraints
  • Nested model references and relationships
  • Both YAML (openapi.yaml) and JSON (openapi.json) formats

Why It's Generated

The OpenAPI schema serves as a contract for other language implementations and tools:

  • TypeScript Implementation: Used by mphuff/otf-api-ts to generate type-safe TypeScript clients
  • API Documentation: Provides machine-readable API documentation
  • Code Generation: Enables automatic code generation for other programming languages
  • Integration Tools: Supports IDE integrations and API testing tools

Generating the Schema

To generate the OpenAPI schema locally:

# Install dependencies
uv sync

# Generate schema
uv run python scripts/generate_openapi.py

The schema files will be created in the schema/ directory:

  • schema/openapi.yaml - YAML format (recommended for readability)
  • schema/openapi.json - JSON format (recommended for tooling)

Schema Structure

The generated schema follows OpenAPI 3.0.3 specification with:

  • Info: API metadata and version information
  • Components/Schemas: All Pydantic models as reusable schema definitions
  • Field Names: Uses snake_case field names to match Python usage
  • Type References: Properly resolved nested model references

The schema represents the complete structure of public API objects documented in the user documentation, making it easy to build compatible clients in other languages.

Metadata

Release files for otf-api 0.22.0

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

Source distribution (sdist)

Source distribution for otf-api 0.22.0
File Size Uploaded Provenance Actions
otf_api-0.22.0.tar.gz 100.7 kB With provenance Details for otf_api-0.22.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for otf-api 0.22.0
File Interpreter ABI Platform Actions
otf_api-0.22.0-py3-none-any.whl Python 3 none any Details for otf_api-0.22.0-py3-none-any.whl

Total release size: 224.8 kB

Release files / otf_api-0.22.0.tar.gz

Download URL otf_api-0.22.0.tar.gz
Size 100.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a6b925f174a90f67b51d8ff564f6354364bbd496c4159fe78b5c781a2d2c1766
BLAKE2b-256 checksum
How to use checksums
5e51b62a7278d3f2a4e3479b22e6844189b0f5d22dd8a5992eb7c12b9c0a42d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / otf_api-0.22.0-py3-none-any.whl

Download URL otf_api-0.22.0-py3-none-any.whl
Size 124.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f2258e67e1fce14c8d8566b86d856dee4b405e2fef0963375bbc489cca3bb7a
BLAKE2b-256 checksum
How to use checksums
3a5e5e11014bb5b870a1dc8e48cd6f7f3be4c42026bd8e350a56886ae384baa9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Security for otf-api 0.22.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for otf_api-0.22.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.22.0 This release

2 release files Full provenance

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