Skip to main content

A Python package for interacting with the Betwatch.com API

Project description

Betwatch Python SDK

PyPI - Version PyPI - Python Version


The Betwatch Python SDK allows you to interact with the Betwatch.com API to integrate up to date racing price data into your Python applications.

Disclaimer

This library is provided on a best-effort basis in order to lower the barrier of entry for accessing the Betwatch API. No guarantees are made for the reliability of this library and development will be ongoing.

Installation

pip install betwatch

Usage

See examples

A Betwatch API key is required. Please contact api@betwatch.com for more information.

Development

Setup

Install dependencies using uv:

uv sync

Install pre-commit hooks:

pre-commit install --hook-type commit-msg

Commit Convention

This project follows Conventional Commits for automatic changelog generation. All commit messages must follow this format:

<type>(<scope>): <subject>

[optional body]

[optional footer]

Types:

  • feat: A new feature (triggers minor version bump)
  • fix: A bug fix (triggers patch version bump)
  • docs: Documentation only changes
  • style: Changes that don't affect code meaning (white-space, formatting)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Performance improvement
  • test: Adding missing tests
  • chore: Changes to build process or auxiliary tools

Breaking Changes: Add ! after the type or BREAKING CHANGE: in the footer to trigger a major version bump.

Examples:

feat: add support for new market types
fix: resolve race condition in async client
docs: update API examples
feat!: change API endpoint structure

The pre-commit hook will validate your commit messages automatically.

Running Tests

uv run pytest

Linting and Type Checking

uv run ruff check .
uv run basedpyright

Generating Changelog Locally

To see what the changelog would look like:

git-cliff --unreleased

Releasing

This project uses GitHub Actions for automated releases and publishing to PyPI.

Release Process

  1. Go to the Actions tab in GitHub
  2. Click "Run workflow"
  3. Enter the new version number (e.g., 1.8.0)
  4. Select the release type (major, minor, or patch)
  5. Click "Run workflow"

This will:

  • Create a release branch with the version bump
  • Generate a changelog from recent commits
  • Create a Pull Request for the release
  • Auto-merge the PR (if CI passes)
  • Create a GitHub release with the changelog
  • Trigger the publish workflow to upload to PyPI

Manual Release

If you need to create a release manually:

  1. Update the version in pyproject.toml
  2. Commit the change: git commit -am "chore: bump version to X.Y.Z"
  3. Create a tag: git tag vX.Y.Z
  4. Push the tag: git push origin vX.Y.Z
  5. Create a GitHub release from the tag

The publish workflow will automatically upload to PyPI when a GitHub release is published.

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

betwatch-1.7.3.tar.gz (8.8 MB view details)

Uploaded Source

Built Distribution

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

betwatch-1.7.3-py3-none-any.whl (25.1 kB view details)

Uploaded Python 3

File details

Details for the file betwatch-1.7.3.tar.gz.

File metadata

  • Download URL: betwatch-1.7.3.tar.gz
  • Upload date:
  • Size: 8.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for betwatch-1.7.3.tar.gz
Algorithm Hash digest
SHA256 4385fc9795f40f89fb22bd7996cd17f114e60caa25763c8ec0dac7a2b8041731
MD5 70c83ede9654c2a8b534db4c63bbe9c2
BLAKE2b-256 e004c7021cc36dffca38a2deb32bd907050e99f1dd8c8e0c971f5c08d7a0cb22

See more details on using hashes here.

Provenance

The following attestation bundles were made for betwatch-1.7.3.tar.gz:

Publisher: release.yml on betwatch/betwatch-sdk-python

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

File details

Details for the file betwatch-1.7.3-py3-none-any.whl.

File metadata

  • Download URL: betwatch-1.7.3-py3-none-any.whl
  • Upload date:
  • Size: 25.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for betwatch-1.7.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b25cc36ff34c78c075ebdf0df1936aa76d688b2668575551084bb667559a5b08
MD5 330250d56570506a387c9193e7a1cf0c
BLAKE2b-256 3107f5613a436cf0e1f18c01657cfcbf27a9e167920df696e274e678606f1afa

See more details on using hashes here.

Provenance

The following attestation bundles were made for betwatch-1.7.3-py3-none-any.whl:

Publisher: release.yml on betwatch/betwatch-sdk-python

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