Async client for Planet Fitness AU (PerfectGym) club occupancy
Project description
pfau-occupancy
Async Python client for Planet Fitness Australia club occupancy, backing a Home Assistant integration. Data comes from the member portal (PerfectGym ClientPortal2), which exposes a live "members currently in club" count for every club in a single authenticated call.
This library deliberately does only the API layer: login, session handling, and fetching occupancy. All Home Assistant concerns (entities, config flow, coordinator) live in the pfau-occupancy-ha integration that depends on this package.
Install
pip install pfau-occupancy
Usage
import asyncio
from pfau_occupancy import PlanetFitnessClient
async def main():
async with PlanetFitnessClient("you@example.com", "password") as client:
clubs = await client.async_get_clubs()
for club in clubs:
print(club.name, club.occupancy)
asyncio.run(main())
The client logs in automatically on first fetch and re-authenticates once if the session expires, so a long-running poller keeps working without intervention.
Data notes
The occupancy endpoint returns every club in one response. Each club carries a
name, address, a currently-in-club count, and a capacity limit (often null). The
response has no club ID, so the (slugified) club name is the stable identity used
for entity unique_ids. A club being renamed therefore looks like one club
disappearing and another appearing.
Disclaimer
This uses the member portal's internal endpoints, which are undocumented and may change or break without notice. It requires your own valid membership credentials. Use it with your own account and keep polling gentle.
Project details
Release history Release notifications | RSS feed
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 pfau_occupancy-0.1.0.tar.gz.
File metadata
- Download URL: pfau_occupancy-0.1.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b15b417659182eb13e814197642a88eaa848c07dc0b6fbce8e668a447045ff7
|
|
| MD5 |
7de62d23c99b643e2dda8f9cc0a0d5dd
|
|
| BLAKE2b-256 |
896d54c7c1fbf0aeeb68f2b658e1fb7bac668bca33ee4450975bec4d5bf03037
|
Provenance
The following attestation bundles were made for pfau_occupancy-0.1.0.tar.gz:
Publisher:
publish.yml on dancmorgan/pfau-occupancy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pfau_occupancy-0.1.0.tar.gz -
Subject digest:
0b15b417659182eb13e814197642a88eaa848c07dc0b6fbce8e668a447045ff7 - Sigstore transparency entry: 2079690865
- Sigstore integration time:
-
Permalink:
dancmorgan/pfau-occupancy@0db25ca5448a12f89b70822a160d26563fce16c5 -
Branch / Tag:
refs/tags/v0.1.1-alpha - Owner: https://github.com/dancmorgan
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0db25ca5448a12f89b70822a160d26563fce16c5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pfau_occupancy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pfau_occupancy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a97e1043b8237de13ef7bd2b3dfa51a589aa3584d1948dd9aacb0600d51f2833
|
|
| MD5 |
2b87550dabf2cd6c84f78a77651935fe
|
|
| BLAKE2b-256 |
87993960a0cf401c1245bf9fa8e10816ba61efd67f3b9bec6e1c2e31f69adb5a
|
Provenance
The following attestation bundles were made for pfau_occupancy-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on dancmorgan/pfau-occupancy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pfau_occupancy-0.1.0-py3-none-any.whl -
Subject digest:
a97e1043b8237de13ef7bd2b3dfa51a589aa3584d1948dd9aacb0600d51f2833 - Sigstore transparency entry: 2079691256
- Sigstore integration time:
-
Permalink:
dancmorgan/pfau-occupancy@0db25ca5448a12f89b70822a160d26563fce16c5 -
Branch / Tag:
refs/tags/v0.1.1-alpha - Owner: https://github.com/dancmorgan
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0db25ca5448a12f89b70822a160d26563fce16c5 -
Trigger Event:
release
-
Statement type: