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
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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bd3d3e1a841fbd1d7d01de267220ca7b5b6bcbcf832b44f7d6c24ee466fdbba |
|
MD5 | f91a40cdefb7a45fa87b16bc91461204 |
|
BLAKE2b-256 | 5bd706c07ad77d444a6403609db15c7eb1de801c67b66504f29db9062225bdef |
Hashes for britishcycling_clubs-0.8.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5728f084ecdfa04633178604898840e5edbbe3126aa11abfec35dc77ec05f1eb |
|
MD5 | f150de4f02e97722d89215bfe9f0105c |
|
BLAKE2b-256 | c371598b62ed093462a0aa23987673488dfb4115366094211dce821c3d456f89 |