Skip to main content

Unofficial Python SDK and CLI for the GameSheet Inc. platform — automates WebUI procedures where a native API is absent.

Project description

gamesheet-sdk-py

Unofficial Python SDK and command-line interface for the GameSheet Inc. platform.

CI Tests CodeQL Docs Dependency review pre-commit pre-commit.ci status codecov

Code style: black Imports: isort Linting: flake8 Linting: pylint Checked with mypy Security: bandit pre-commit

PyPI version PyPI - Python Version PyPI - Wheel PyPI - Status PyPI - Downloads License: MIT Typed Hatch project

GitHub release GitHub stars GitHub forks GitHub issues GitHub pull requests GitHub contributors GitHub commit activity

GitHub last commit Maintenance Dependabot GitHub repo size GitHub code size


⚠️ Disclaimer

This project is not affiliated with, endorsed by, or sponsored by GameSheet Inc. GameSheet Inc. does not publish a public REST/GraphQL API for the operations this SDK covers. Where a native API is absent, this library automates the GameSheet WebUI (using HTTP requests, HTML parsing, and headless-browser automation).

Because this approach depends on third-party UI structure, it may break without warning when GameSheet ships changes. Check the GitHub Releases page before upgrading in production.

Use of this software must comply with the GameSheet Inc. Terms of Service. You are responsible for any automation you perform.


Quick Links


Features

  • Authentication — Browser-driven login flow with persistent session storage
  • Resource-oriented CLIassociations, leagues, seasons, ipad-keys commands with intuitive aliases
  • Python APIlist_associations(), list_leagues(), list_seasons(), get_season(), list_ipad_keys()
  • Multiple output formats — JSON, YAML, CSV, TSV, or 13 tabulate table formats
  • Shell completion — Tab completion for bash, zsh, fish
  • Typed (PEP 561) — Ships py.typed marker, passes mypy --strict
  • Automated releasesConventional Commits + python-semantic-release

Requirements

  • Python 3.11+ (3.11, 3.12, 3.13, or 3.14)
  • Chromium (managed by Playwright) — required for login flow

Installation

pip install gamesheet-sdk-py

# Install Playwright browser (required for login)
python -m playwright install chromium

From Source

git clone https://github.com/bdperkin/gamesheet-sdk-py.git
cd gamesheet-sdk-py
pip install -e ".[all]"
python -m playwright install chromium

See Development Setup for detailed instructions.


Quick Start

CLI

# Authenticate (credentials can also come from env vars)
gamesheet-sdk-py login --email you@example.com

# List associations
gamesheet-sdk-py associations list --format json

# List leagues in an association
gamesheet-sdk-py leagues list 38 --format json

# List seasons in a league
gamesheet-sdk-py seasons list 1148580 --format json

# Get season details
gamesheet-sdk-py season get 15020 --format json

# Get iPad/Scoring keys
gamesheet-sdk-py ipad-keys get 15020 --format json

See the CLI Reference for complete usage.

Python API

from gamesheet_sdk import (
    AuthenticatedSession,
    Config,
    get_season,
    list_associations,
    list_ipad_keys,
    list_leagues,
    list_seasons,
    load_access_token,
    load_refresh_token,
    save_tokens,
)

config = Config()
access = load_access_token(config)
refresh = load_refresh_token(config)

with AuthenticatedSession(
    config,
    access_token=access or "",
    refresh_token=refresh or "",
    on_refresh=lambda tokens: save_tokens(config, **tokens),
) as session:
    # List all associations
    for assoc in list_associations(session):
        print(f"Association: {assoc.title}")

        # List leagues
        for league in list_leagues(session, assoc.id):
            print(f"  League: {league.title}")

            # List seasons
            for season in list_seasons(session, league.id):
                print(f"    Season: {season.title}")

                # Get detailed info
                detail = get_season(session, season.id)
                print(f"      Sport: {detail.sport}")

                # Get iPad keys
                keys = list_ipad_keys(session, season.id)
                for key in keys:
                    print(f"        Key: {key.value}")

Configuration

Configuration via environment variables or CLI flags. See Configuration Reference for details.

export GAMESHEET_USERNAME=you@example.com
export GAMESHEET_PASSWORD=secret
export GAMESHEET_TIMEOUT=60

gamesheet-sdk-py login

Documentation

Full documentation is available at https://bdperkin.github.io/gamesheet-sdk-py/

The docs follow the Diátaxis framework:


Project Status

Status: Alpha — Active development, breaking changes possible before 1.0.0

  • Version strategy: Patch-only bumps until 1.0.0 (see Release Process)
  • Test coverage: 100% (enforced via Codecov)
  • Type checking: mypy --strict passes
  • Complexity: All blocks at cyclomatic complexity grade A (cc ≤ 5)

Contributing

Contributions are welcome! Before opening a PR:

  1. Read Development Setup
  2. Follow Conventional Commits format
  3. Ensure tests pass: pytest --cov
  4. Run quality gates: pre-commit run --all-files
  5. Maintain 100% test coverage
  6. Keep complexity at grade A (run make metrics)

See CONTRIBUTING.md for detailed guidelines.


Security

To report a vulnerability, see SECURITY.md. Please use the private reporting channel — do not open public issues for security reports.


License

Distributed under the MIT License. © 2026 bdperkin.


Links

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

gamesheet_sdk_py-0.0.8.tar.gz (119.5 kB view details)

Uploaded Source

Built Distribution

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

gamesheet_sdk_py-0.0.8-py3-none-any.whl (76.6 kB view details)

Uploaded Python 3

File details

Details for the file gamesheet_sdk_py-0.0.8.tar.gz.

File metadata

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

File hashes

Hashes for gamesheet_sdk_py-0.0.8.tar.gz
Algorithm Hash digest
SHA256 0d2c98909b4adc48c5e93d0d83418a6bddd32b13bc3b73cb0411e749b2ff3574
MD5 b402727b8cd5ba1c4eedddeea7917d17
BLAKE2b-256 f0bdbc67f20ace89cd779f3936e8b0f38c5b473cc3f81314ce54fc169509b55a

See more details on using hashes here.

Provenance

The following attestation bundles were made for gamesheet_sdk_py-0.0.8.tar.gz:

Publisher: release.yml on bdperkin/gamesheet-sdk-py

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

File details

Details for the file gamesheet_sdk_py-0.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for gamesheet_sdk_py-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 644a751717c342128adef976e3b0617603921d8caf4064b97bdb646408b90c20
MD5 68bcc3ad3ecebca8df2643b4f9a09a17
BLAKE2b-256 107484e845ea176b3d8a0eb0f1b2a16e442875a8070faeed3268f27c5f8a47f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for gamesheet_sdk_py-0.0.8-py3-none-any.whl:

Publisher: release.yml on bdperkin/gamesheet-sdk-py

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