A library to interact with Pure Fitness/Pure Yoga APIs.
Project description
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+
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pypuregym-1.7.0.tar.gz.
File metadata
- Download URL: pypuregym-1.7.0.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f3fe84eddc7c3d3f139117abecae8ff16f3b1d07df3f9009c826f24daad8d54
|
|
| MD5 |
1372f376f0432ddae6cfdace6d59efbf
|
|
| BLAKE2b-256 |
55fc70fad09ab367975d8d405aa8cbb7b5ec82c47bfd126cf717be8b7bbe521c
|
File details
Details for the file pypuregym-1.7.0-py3-none-any.whl.
File metadata
- Download URL: pypuregym-1.7.0-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5bf6dbd7fa2d370409713aa3262bfbb419085eb44cae0d4373658345b92732bc
|
|
| MD5 |
8c2f047a77cc6573cc49c6dbf732c12f
|
|
| BLAKE2b-256 |
ce1d9fa7ec7a91162084e9c8c57ccd9c537b2c0a41ac69eea394a0c0e46eb538
|