Unofficial library to automate aspects of British/Scottish/Welsh Cycling's club Membership Manager system
Project description
britishcycling-clubs
About
Unofficial, not affiliated or endorsed by British/Scottish/Welsh Cycling.
Library to automate aspects of British Cycling's Club Management Tool, in order to simplify administration for clubs using it. It probably works for Scottish/Welsh Cycling clubs too, but this hasn't been tested.
Priority is to read data in order to create reports/notifications to club administrators.
Prerequisites
- Credentials for a club using the Club Management Tool
Installation
Install from PyPI, e.g:
pip install britishcycling-clubs
Some functions use Playwright to automate a headless Chromium browser. This needs to be installed:
playwright install chromium
If you're installing in e.g. a bare-bones server/CI environment, you'll probably be prompted to install system dependencies, which you can do with:
playwright install-deps chromium
See also https://playwright.dev/python/docs/browsers#install-system-dependencies
Usage
Get member counts from a club's Club Manager pages
def get_manager_member_counts(
club_id: str,
username: str,
password: str,
manager_page_load_delay: int = 5,
) -> dict[str, int]:
Get numbers of active, new, expired members from the club manager page.
Specifically, returns the counts from these tabs:
- Active Club Members
- New Club Subscriptions
- Expired Club Members
This takes about 10s.
Example script example_manager_member_counts.py
loads club ID and credentials from
config.ini
(you'll need to copy config_dist.ini
, populate and rename to
config. ini
). It then retrieves and prints the number of active, expired and new/pending
club member counts from the club's Club Manager pages.
Get info from a club's profile page
get_profile_info(club_id: str) -> dict[str, int | str]
Return information from the club's public profile page; doesn't require login.
Specifically, returns these values:
- Club name
- Total club members
Example script example_profile_info.py
loads club ID from config.ini
(you'll
need to copy config_dist.ini
, populate club ID only and rename). It
then retrieves and prints the club name and total member count.
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
Hashes for britishcycling_clubs-0.8.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19e33b8057d37c1489add4f755507feebfe68ed1806b9eabc4ce3e9d6626b995 |
|
MD5 | f83e273612c6d8093c76505d08ad783f |
|
BLAKE2b-256 | fd1c55f4bd30cf888574a280f9df381c5f6a7dee27a2faef0d9c3d85a1569caf |
Hashes for britishcycling_clubs-0.8.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80523baa122bc6f1789dc065f2b4ca419f0ddd2a1d1b229f0c79cdcf5ac21c10 |
|
MD5 | 576bf7a10d1dc9b95f7315e7252abf2f |
|
BLAKE2b-256 | 1515eedd494acd4b64bf61ba5c62df922cc59218fbe0b63f8108b1ec5b96e05c |