gamesheet-sdk-py
- 1. ⚠️ Disclaimer
- 2. Quick Links
- 3. Features
- 4. Requirements
- 5. Installation
- 6. Available Resources
- 7. Quick Start
- 8. Configuration
- 9. Documentation
- 10. Project Status
- 11. Contributing
- 12. Security
- 13. License
- 14. Support
- 15. Links
Unofficial Python SDK and command-line interface for the GameSheet Inc. platform.
1. ⚠️ 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.
2. Quick Links
- Documentation — Full documentation (tutorials, how-tos, API reference)
- Installation — Get started quickly
- Quick Start — First commands to try
- CLI Reference — Command-line usage
- Configuration — Environment variables and settings
- Development Setup — Contributing guide
- Release Process — Automated releases with Conventional Commits
- CHANGELOG — Release history
3. Features
- Authentication — Browser-driven login flow with persistent session storage
- Resource-oriented CLI — Intuitive verb-noun command structure with aliases (
ls,rm,get, etc.) - Comprehensive resource coverage — Manage associations, leagues, seasons, divisions, teams, games, referees, rosters (players & coaches), locations, and broadcasters
- Python API — Fully typed Python SDK with pydantic models for all resources
- 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.typedmarker, passesty check - 100% test coverage — Comprehensive test suite with VCR cassettes and browser automation tests
- Automated releases — Conventional Commits + python-semantic-release
- Docker support — Pre-built container images with Playwright bundled
4. Requirements
- Python 3.11+ (3.11, 3.12, 3.13, or 3.14)
- Chromium (managed by Playwright) — required for login flow
5. Installation
5.1. From PyPI (Recommended)
Install the package from PyPI using standard pip:
pip install gamesheet-sdk-py
# Install Playwright browser binary (required for login flow)
python -m playwright install chromium
5.2. Using UV (10x Faster)
If you use Astral uv, dependency installation is substantially faster:
# Add as a project dependency
uv add gamesheet-sdk-py
# Or install in a virtual environment
uv pip install gamesheet-sdk-py
# Install Playwright browser binary (required for login flow)
uv run playwright install chromium
5.3. From Source
Clone the repository and install with all development extras:
git clone https://github.com/bdperkin/gamesheet-sdk-py.git
cd gamesheet-sdk-py
uv sync --all-extras
uv run playwright install chromium
# Or build the Docker image locally
make docker-build
make docker-run
See Development Setup for detailed instructions.
5.4. Via Docker
Pre-built images include Playwright (Chromium) for seamless browser automation.
# Pull the latest image from GitHub Container Registry
docker pull ghcr.io/bdperkin/gamesheet-sdk-py:latest
# Show available CLIs
docker run --rm ghcr.io/bdperkin/gamesheet-sdk-py:latest
# Run the admin CLI
docker run --rm ghcr.io/bdperkin/gamesheet-sdk-py:latest gamesheet-admin --help
# Run with persistent session storage (recommended for multi-command workflows)
docker run --rm -v ~/.gamesheet:/home/gamesheet/.gamesheet \
ghcr.io/bdperkin/gamesheet-sdk-py:latest gamesheet-admin associations list
# Example: login and list associations
docker run -it --rm -v ~/.gamesheet:/home/gamesheet/.gamesheet \
-e GAMESHEET_USERNAME=you@example.com \
-e GAMESHEET_PASSWORD=secret \
ghcr.io/bdperkin/gamesheet-sdk-py:latest gamesheet-admin login
docker run --rm -v ~/.gamesheet:/home/gamesheet/.gamesheet \
ghcr.io/bdperkin/gamesheet-sdk-py:latest gamesheet-admin associations list --format json
Available Docker tags:
latest— most recent release from main branch<version>— specific version (e.g.,0.4.27,0.4,0)<branch>-<sha>— specific commit for traceability
6. Available Resources
The SDK provides comprehensive coverage of GameSheet resources across both Admin and Teams dashboards:
| Resource | CLI Command | Description |
|---|---|---|
| Associations | associations |
Top-level organizational units |
| Leagues | leagues |
Leagues within associations |
| Seasons | seasons |
Seasons within leagues |
| Divisions | divisions |
Divisions within seasons |
| Teams | teams |
Teams within divisions |
| Games | games scheduled, games completed, games brackets |
Scheduled, completed, and bracket games |
| Referees | referees |
Referee management and reports |
| Roster | roster players, roster coaches |
Season-level roster management |
| Team Roster | teams roster players, teams roster coaches |
Team-level roster management |
| Locations | locations |
Game locations and venues |
| iPad Keys | ipad-keys |
iPad scoring access keys |
| Lookups | lookups (teams CLI) |
Public enumeration metadata |
Each resource supports intuitive verbs: list (or ls), get (or show/view), create (or add/new), update (or set/edit), delete (or
rm/remove) where applicable. Most resources default to list when invoked without a verb (e.g., gamesheet-admin associations runs list).
7. Quick Start
7.1. CLI
7.1.1. Admin CLI (gamesheet-admin)
# Authenticate (credentials can also come from env vars)
gamesheet-admin login --email you@example.com
# List associations
gamesheet-admin associations list --format json
# Shorthand: gamesheet-admin associations (default=list)
# List leagues in an association
gamesheet-admin leagues list 38 --format json
# List seasons in a league
gamesheet-admin seasons list 1148580 --format json
# Get season details
gamesheet-admin seasons get --season-id 15020 --format json
# Get iPad/Scoring keys
gamesheet-admin ipad-keys get 15020 --format json
# Manage divisions
gamesheet-admin divisions list --season-id 15020 --format json
gamesheet-admin divisions create --season-id 15020 --name "Bantam A" --format json
# Manage teams
gamesheet-admin teams list --division-id 123 --format json
gamesheet-admin teams create --division-id 123 --name "Hawks" --format json
# List games (scheduled, completed, brackets)
gamesheet-admin games scheduled --season-id 15020 --format json
gamesheet-admin games completed --season-id 15020 --format json
gamesheet-admin games brackets --season-id 15020 --format json
# Manage referees
gamesheet-admin referees list --season-id 15020 --format json
gamesheet-admin referees get --referee-id 456 --format json
# Manage roster (players and coaches)
gamesheet-admin roster players list --season-id 15020 --format json
gamesheet-admin roster coaches list --season-id 15020 --format json
# Tab completion setup
gamesheet-admin completion bash > ~/.gamesheet-admin-completion.bash
source ~/.gamesheet-admin-completion.bash
7.1.2. Teams CLI (gamesheet-teams)
# Authenticate against teams dashboard (HTTP-only)
gamesheet-teams login --email you@example.com
# List public lookup categories (no auth required)
gamesheet-teams lookups list --format json
# Get lookup values for a specific category
gamesheet-teams lookups get --category sports --format json
See the CLI Reference for complete usage.
7.2. Python API
from gamesheet_sdk import (
AuthenticatedSession,
Config,
get_season,
list_associations,
list_divisions,
list_ipad_keys,
list_leagues,
list_seasons,
list_teams,
load_access_token,
load_refresh_token,
save_tokens,
)
# Configure and authenticate
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 season 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}")
# List divisions
divisions = list_divisions(session, season.id)
for division in divisions:
print(f" Division: {division.name}")
# List teams in division
teams = list_teams(session, division.id)
for team in teams:
print(f" Team: {team.name}")
All functions return fully typed pydantic models with comprehensive field validation.
8. 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-admin login
9. Documentation
Full documentation is available at https://bdperkin.github.io/gamesheet-sdk-py/
The docs follow the Diataxis framework:
- Tutorials — Step-by-step learning guides
- How-To Guides — Task-oriented recipes
- Reference — API and CLI documentation
- Explanation — Understanding the architecture
10. Project Status
Status: Alpha — Active development, breaking changes possible before 1.0.0
- Current version: 0.4.27
- Python support: 3.11, 3.12, 3.13, 3.14
- Version strategy: Patch-only bumps until 1.0.0 (see Release Process)
- Test coverage: 100% (enforced locally and via Codecov)
- Type checking:
ty checkpasses on all source code - Code quality: All blocks maintain cyclomatic complexity grade A (cc ≤ 5)
- CI/CD: Comprehensive test matrix across Python versions, multi-OS testing (nightly), security scanning (Semgrep, Trivy, GitGuardian, OSV-Scanner, CodeQL), and automated PyPI releases
11. Contributing
Contributions are welcome! Before opening a PR:
- Read Development Setup
- Follow Conventional Commits format
- Ensure tests pass:
pytest --cov - Run quality gates:
pre-commit run --all-files - Maintain 100% test coverage
- Keep complexity at grade A (run
make metrics)
See CONTRIBUTING.md for detailed guidelines. We follow the Contributor Covenant Code of Conduct.
12. Security
Security is a top priority. This project employs multiple layers of automated security scanning:
- Static analysis: Semgrep (SAST), CodeQL (semantic analysis)
- Dependency scanning: OSV-Scanner, pip-audit
- Container scanning: Trivy (with CVE suppression documented in
.trivyignore.yaml, each entry carrying a rationale and an expiry date) - Secret detection: GitGuardian
- Code quality: Pre-commit hooks enforce security best practices
Reporting vulnerabilities: See SECURITY.md. Please use the private reporting channel — do not open public issues for security reports.
13. License
Distributed under the MIT License. © 2026 bdperkin.
14. Support
Need help? See SUPPORT.md for:
- Common issues and solutions
- How to ask questions (GitHub Discussions)
- How to report bugs (GitHub Issues)
- Response time expectations
15. Links
- PyPI: https://pypi.org/project/gamesheet-sdk-py/
- Documentation: https://bdperkin.github.io/gamesheet-sdk-py/
- Source: https://github.com/bdperkin/gamesheet-sdk-py
- Issues: https://github.com/bdperkin/gamesheet-sdk-py/issues
- Discussions: https://github.com/bdperkin/gamesheet-sdk-py/discussions
- Changelog: CHANGELOG.md
- Releases: https://github.com/bdperkin/gamesheet-sdk-py/releases
Metadata
Release files for gamesheet-sdk-py 0.5.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gamesheet_sdk_py-0.5.5.tar.gz | 406.9 kB | With provenance | Details for gamesheet_sdk_py-0.5.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gamesheet_sdk_py-0.5.5-py3-none-any.whl | Python 3 | none | any | Details for gamesheet_sdk_py-0.5.5-py3-none-any.whl |
Total release size: 661.7 kB
Release files / gamesheet_sdk_py-0.5.5.tar.gz
| Download URL | gamesheet_sdk_py-0.5.5.tar.gz |
|---|---|
| Size | 406.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a4d40d8e25683e47f035b0f9a6f9d78bd7c21ee01750ed444cd32babcf46f5db
|
|
BLAKE2b-256 checksum How to use checksums |
0228a10346c8dc6f8e449cf038adb15dbbd312a8aeac771c4097f96ca997e3e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency logRelease files / gamesheet_sdk_py-0.5.5-py3-none-any.whl
| Download URL | gamesheet_sdk_py-0.5.5-py3-none-any.whl |
|---|---|
| Size | 254.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bc3fc90fe4be71d42d51a7965ea5b453608576ebefa6b9acc0bd2f72f91559d2
|
|
BLAKE2b-256 checksum How to use checksums |
6efd7831b10df7d9752272a03fcef45c4f97fae34dbe909f8ed01ea926568ce8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency logSecurity for gamesheet-sdk-py 0.5.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for gamesheet_sdk_py-0.5.5.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.