Skip to main content

Documentation Status Build Status codecov

pypuregym

A Python library to interact with Pure Fitness/Pure Yoga APIs. This library helps you to get the schedule of a Pure studio and book classes. Currently, the following Pure locations are supported:

  • Hong Kong
  • Singapore
  • Shanghai

Installation

$ pip install pypuregym

CLI usage

$ pypuregym --help
Interact with Pure Fitness/Yoga service.

Usage:
  pypuregym location <gym-type> <region-id>
  pypuregym schedule <region-id> <location-id> <date>
  pypuregym book <region-id> <class-id> <username> <password> [--wait-until <wait>] [--retry <retry>]

Options:
  <gym-type>                  Can be "fitness" or "yoga".
  <region-id>                 Can be "HK", "CN" or "SG".
  <location-id>               ID of the studio (given with the "location" command).
  <date>                      Date to get the schedule for.
  <class-id>                  Class ID to book.
  <username>                  Your Pure username/email.
  <password>                  Your Pure password.
  --wait-until <wait>         When booking a class, wait until the specified date time before booking.
  --retry <retry>             Number of time to retry when booking the class.

Get Pure locations

$ pypuregym location fitness hk
╒══════╤═════════════════╤══════════════════════════════╤══════════════╕
│   ID │ Code            │ Name                         │ District     │
╞══════╪═════════════════╪══════════════════════════════╪══════════════╡
│    4 │ LTP             │ Lee Theatre                  │ Causeway Bay │
├──────┼─────────────────┼──────────────────────────────┼──────────────┤
│    6 │ LPF             │ Langham Place                │ Mongkok      │
├──────┼─────────────────┼──────────────────────────────┼──────────────┤
│    8 │ KIN             │ Kinwick Centre               │ Central      │
╘══════╧═════════════════╧══════════════════════════════╧══════════════╛

Get Pure schedule

$ pypuregym schedule hk 4 2020-01-01
╒═══════╤═════════════════════╤═══════════╤══════════════╤════════════╕
│    ID │ Class Name          │ Teacher   │ Start Time   │ End Time   │
╞═══════╪═════════════════════╪═══════════╪══════════════╪════════════╡
│ 71647 │ BODYATTACK™         │ John D.   │ 10:00:00     │ 11:00:00   │
├───────┼─────────────────────┼───────────┼──────────────┼────────────┤
│ 71648 │ RPM™                │ John D.   │ 11:15:00     │ 12:05:00   │
├───────┼─────────────────────┼───────────┼──────────────┼────────────┤
│ 71649 │ BODYPUMP™           │ Jane F.   │ 11:15:00     │ 12:15:00   │
├───────┼─────────────────────┼───────────┼──────────────┼────────────┤
│ 71650 │ ABS, BUTTS & THIGHS │ Jane F.   │ 12:30:00     │ 13:30:00   │
╘═══════╧═════════════════════╧═══════════╧══════════════╧════════════╛

Book a class

$ pypuregym book hk 155188 $PURE_USERNAME $PURE_PASSWORD

Documentation

You can read the documentation here. This project has been tested under Python 3.6+

Metadata

Release files for pypuregym 1.7.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 pypuregym 1.7.0
File Size Uploaded
pypuregym-1.7.0.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pypuregym 1.7.0
File Interpreter ABI Platform
pypuregym-1.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.9 kB

Release files / pypuregym-1.7.0.tar.gz

Download URL pypuregym-1.7.0.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3f3fe84eddc7c3d3f139117abecae8ff16f3b1d07df3f9009c826f24daad8d54
BLAKE2b-256 checksum
How to use checksums
55fc70fad09ab367975d8d405aa8cbb7b5ec82c47bfd126cf717be8b7bbe521c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / pypuregym-1.7.0-py3-none-any.whl

Download URL pypuregym-1.7.0-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5bf6dbd7fa2d370409713aa3262bfbb419085eb44cae0d4373658345b92732bc
BLAKE2b-256 checksum
How to use checksums
ce1d9fa7ec7a91162084e9c8c57ccd9c537b2c0a41ac69eea394a0c0e46eb538
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

1.7.0 This release

2 release files

1.6.0

1 release file

1.4.0

1 release file

1.3.0

1 release file

1.2.0

1 release file

1.1.0

1 release file

1.0.0

1 release file

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