Monorepo for Kadoa's official SDKs for Node.js and Python, providing easy integration with Kadoa's web data extraction platform.
- Contributing Guide - How to contribute to this project
- Development Workflow - Preview releases and branch strategy
- Node.js SDK Documentation - Installation and usage
- Python SDK Documentation - Installation and usage
This repository uses direnv for automatic environment variable management.
macOS:
brew install direnv
echo 'eval "$(direnv hook zsh)"' >> ~/.zshrc # for zsh
# OR
echo 'eval "$(direnv hook bash)"' >> ~/.bashrc # for bashLinux:
curl -sfL https://direnv.net/install.sh | bash
echo 'eval "$(direnv hook bash)"' >> ~/.bashrc-
Copy the example environment file:
cp .env.example .env
-
Edit
.envwith your API credentials:# Required for tests KADOA_API_KEY=your-api-key-here TEST_USER_API_KEY=your-api-key-here # Same as KADOA_API_KEY for Node features (personal or team API key)
-
Allow direnv to load the environment:
direnv allow
Now environment variables will be automatically loaded when you enter any project directory!
- Node SDK Changelog - Public releases
- Python SDK Changelog - Public releases
This repository uses Release Please for automated versioning and releases.
Main Branch (main):
- Stable releases with semantic versioning
- Automatic releases via Release Please
- Published to npm/PyPI with
latesttag
Development Branch (development):
- Preview releases for every commit
- Version format:
X.Y.Z-dev.{shortSHA}(e.g.,0.13.0-dev.abc1234) - Published to npm with
devtag, PyPI as prerelease - Install with:
npm install @kadoa/node-sdk@devorpip install --pre kadoa_sdk
Commits that trigger automatic releases:
feat:- New features (minor version bump)fix:- Bug fixes (patch version bump)feat!:orfix!:- Breaking changes (major version bump)
Example:
git commit -m "feat(sdks/python): add retry logic to API client"To create a release candidate for testing before the final release:
-
Update version numbers in two locations:
sdks/python/pyproject.toml: Changeversion = "X.Y.Z"toversion = "X.Y.Zrc1"sdks/python/kadoa_sdk/version.py: Change__version__ = "X.Y.Z"to__version__ = "X.Y.Zrc1"
-
Build the package:
cd sdks/python uv build -
Publish to PyPI:
uvx uv-publish
Note: Requires PyPI credentials configured in
~/.pypirc(see Publishing Setup) -
Install the pre-release:
uv pip install --pre kadoa-sdk==X.Y.Zrc1 # or with pip pip install --pre kadoa-sdk==X.Y.Zrc1
-
Update version in
sdks/node/package.json: Change"version": "X.Y.Z"to"version": "X.Y.Z-rc.1" -
Build the package:
cd sdks/node bun run build -
Publish to npm with the
rctag:npm publish --tag rc
-
Install the pre-release:
npm install @kadoa/node-sdk@rc # or specific version npm install @kadoa/node-sdk@X.Y.Z-rc.1
Note: Pre-releases are automatically marked as prerelease versions and won't be installed by default unless explicitly requested with --pre flag (Python) or @rc tag (Node.js).
gh pr list --label "autorelease: pending" # Check pending releases
gh release list --limit 5 # View recent releases
gh release list --limit 10 --prerelease # View preview releasesSDKs are generated from a committed OpenAPI spec (specs/openapi.json) to ensure reproducible builds.
# Fetch latest spec
bun kadoa-codegen fetch-spec -e https://api.kadoa.com/openapi -f
# Generate SDKs from local spec
bun kadoa-codegen generate
# Commit both spec and generated code
git add specs/openapi.json sdks/*/src/generated
git commit -m "feat: update API client to latest spec"# Against local API
bun kadoa-codegen fetch-spec -e http://localhost:12380/openapi -f
bun kadoa-codegen generateNote: Production builds use committed specs only. Never use --fetch-latest in CI.
npm: Configure ~/.npmrc:
//registry.npmjs.org/:_authToken=${NPM_TOKEN}PyPI: Configure ~/.pypirc:
[pypi]
username = __token__
password = pypi-<your-token>gh secret set NPM_TOKEN --body "$NPM_TOKEN"
gh secret set PYPI_API_TOKEN --body "$PYPI_API_TOKEN"If release-please is not working correctly, ensure that:
- Git tags exist for all released versions (e.g.,
node-sdk-v0.16.2) - The
.release-please-manifest.jsonmatches the latest released version - Commit messages follow conventional commit format (
feat:,fix:, etc.)