This repo publishes the Python SDK as odds-api-client.
Use Trusted Publishing from GitHub Actions. Do not store a long-lived PyPI token in GitHub secrets unless Trusted Publishing is unavailable.
- PyPI project:
odds-api-client - First published version:
0.1.1 - GitHub environment:
pypi - Publish workflow:
.github/workflows/python-publish.yml - Install command:
python3 -m pip install odds-api-client
The one-time pending Trusted Publisher setup has been completed. Future package uploads should happen through GitHub Actions.
Coordinate Python SDK releases with npm package releases in npm-publishing.md so install docs, examples, and agent answers stay aligned across package managers. A single GitHub release vX.Y.Z triggers both publish-python and publish-npm, so keep all package versions equal.
Use this only if the PyPI project or trusted publisher ever needs to be recreated. Create or use the PyPI owner account or organization that should own odds-api-client.
Add a pending trusted publisher on PyPI with these exact fields:
| Field | Value |
|---|---|
| PyPI project name | odds-api-client |
| Owner | odds-api |
| Repository name | odds-api |
| Workflow filename | python-publish.yml |
| Environment name | pypi |
The pending publisher does not reserve the name. Publish the first release soon after adding it.
Use this only when publishing from main without a new GitHub release:
gh workflow run python-publish.yml \
--repo odds-api/odds-api \
-f version=X.Y.Z \
-f publish=publishThen verify:
python3 -m pip install --upgrade odds-api-client
python3 -c "from odds_api import OddsApiClient, __version__; print(__version__, OddsApiClient)"-
Update
sdks/python/pyproject.tomlandsdks/python/src/odds_api/__init__.pyto the same new version. -
Run CI locally where practical:
python3 -m pip install --upgrade build twine cd sdks/python python3 -m build python3 -m twine check dist/*
-
Commit the version bump.
-
Create and publish a GitHub release tag that matches the Python package version, for example
v0.1.2. -
The
publish-pythonworkflow builds, checks, smoke-installs, and publishes the package to PyPI.
- Publish only from the intended
odds-api/odds-apicheckout. - Publish only to the
odds-api-clientPyPI project. - Never include private implementation details, secrets, parser internals, raw datasets, admin endpoints, proprietary scoring internals, local machine paths, or maintainer-only setup notes.
- PyPI versions are immutable. If a version has been uploaded, bump to a new version.