A Python package for interacting with the Betwatch.com API
Project description
Betwatch Python SDK
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 changesstyle: Changes that don't affect code meaning (white-space, formatting)refactor: Code change that neither fixes a bug nor adds a featureperf: Performance improvementtest: Adding missing testschore: 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
- Go to the Actions tab in GitHub
- Click "Run workflow"
- Enter the new version number (e.g.,
1.8.0) - Select the release type (
major,minor, orpatch) - 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:
- Update the version in
pyproject.toml - Commit the change:
git commit -am "chore: bump version to X.Y.Z" - Create a tag:
git tag vX.Y.Z - Push the tag:
git push origin vX.Y.Z - 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4385fc9795f40f89fb22bd7996cd17f114e60caa25763c8ec0dac7a2b8041731
|
|
| MD5 |
70c83ede9654c2a8b534db4c63bbe9c2
|
|
| BLAKE2b-256 |
e004c7021cc36dffca38a2deb32bd907050e99f1dd8c8e0c971f5c08d7a0cb22
|
Provenance
The following attestation bundles were made for betwatch-1.7.3.tar.gz:
Publisher:
release.yml on betwatch/betwatch-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
betwatch-1.7.3.tar.gz -
Subject digest:
4385fc9795f40f89fb22bd7996cd17f114e60caa25763c8ec0dac7a2b8041731 - Sigstore transparency entry: 1191078934
- Sigstore integration time:
-
Permalink:
betwatch/betwatch-sdk-python@7cb2ccdd0540560f5ea8cc345191e6310cea3b86 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/betwatch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7cb2ccdd0540560f5ea8cc345191e6310cea3b86 -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b25cc36ff34c78c075ebdf0df1936aa76d688b2668575551084bb667559a5b08
|
|
| MD5 |
330250d56570506a387c9193e7a1cf0c
|
|
| BLAKE2b-256 |
3107f5613a436cf0e1f18c01657cfcbf27a9e167920df696e274e678606f1afa
|
Provenance
The following attestation bundles were made for betwatch-1.7.3-py3-none-any.whl:
Publisher:
release.yml on betwatch/betwatch-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
betwatch-1.7.3-py3-none-any.whl -
Subject digest:
b25cc36ff34c78c075ebdf0df1936aa76d688b2668575551084bb667559a5b08 - Sigstore transparency entry: 1191078937
- Sigstore integration time:
-
Permalink:
betwatch/betwatch-sdk-python@7cb2ccdd0540560f5ea8cc345191e6310cea3b86 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/betwatch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7cb2ccdd0540560f5ea8cc345191e6310cea3b86 -
Trigger Event:
workflow_dispatch
-
Statement type: