Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pfau_occupancy-0.1.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pfau_occupancy-0.1.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file pfau_occupancy-0.1.1.tar.gz.

File metadata

  • Download URL: pfau_occupancy-0.1.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pfau_occupancy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3de02f91f99b6211f7a52e3b8b540a4a624e3c114abfdbc89952be3cc45df489
MD5 157d571840f1bed03f2846c548b35ef1
BLAKE2b-256 29a75b7c5d3bbb7cc88745433d8da7aed47736fefd97d5eec97303675c5a0f2c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfau_occupancy-0.1.1.tar.gz:

Publisher: publish.yml on dancmorgan/pfau-occupancy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pfau_occupancy-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pfau_occupancy-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pfau_occupancy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4056b1243e41e450230688ab2593fc58c99af67dd21707aa31f98c442e455e53
MD5 d01d71a90a08effbdfc92db385d684ca
BLAKE2b-256 4326fb95c1b3eba32aa4bd28ce9b2300a49e6eeb0edb3fe6218eec8b211ff71e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pfau_occupancy-0.1.1-py3-none-any.whl:

Publisher: publish.yml on dancmorgan/pfau-occupancy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page