The SochDB Python SDK wraps pre-compiled binaries from the main SochDB repository (sochdb/sochdb) and packages them into platform-specific Python wheels for distribution on PyPI.
- All binaries come from the main sochdb/sochdb repository
- The Python SDK does NOT compile binaries itself
- Each release pulls pre-built binaries from a specific sochdb/sochdb release
Each platform-specific wheel contains:
- Python SDK code (
sochdbpackage) - Executables (in
_bin/<platform>/):sochdb-bulk- CLI tool for bulk operationssochdb-server- Standalone database serversochdb-grpc-server- gRPC server implementation
- Native Libraries (in
lib/<platform>/):libsochdb_storage.*- Storage engine FFI librarylibsochdb_index.*- Indexing engine FFI library
The workflow builds wheels for:
- Linux x86_64 (
manylinux_2_17_x86_64) - macOS ARM64 (
macosx_11_0_arm64) - Apple Silicon - Windows x64 (
win_amd64)
Wheels are compatible with:
- Python 3.9
- Python 3.10
- Python 3.11
- Python 3.12
- Python 3.13
- Ensure the desired version exists as a release in sochdb/sochdb
- The release must have platform-specific archives:
sochdb-{version}-x86_64-unknown-linux-gnu.tar.gzsochdb-{version}-aarch64-apple-darwin.tar.gzsochdb-{version}-x86_64-pc-windows-msvc.zip
- Go to Actions tab in GitHub
- Select "Release" workflow
- Click "Run workflow"
- Enter parameters:
version: The version for the Python SDK (e.g.,0.3.2)sochdb_version: (Optional) If different fromversion, specify the sochdb/sochdb release to pull binaries fromdry_run: Check this to validate without publishing
-
Build Wheels (parallel):
- Downloads binaries from
sochdb/sochdbrelease - Creates platform-specific wheels
- Each wheel is self-contained with binaries for that platform
- Downloads binaries from
-
Build Source Distribution:
- Creates
.tar.gzwith Python source code - Does NOT include binaries
- Creates
-
Create GitHub Release:
- Creates a new release tag (e.g.,
v0.3.2) - Attaches all wheels and source distribution
- Generates release notes with installation instructions
- Creates a new release tag (e.g.,
-
Publish to PyPI:
- Uploads all wheels and source distribution
- Uses OIDC Trusted Publisher (no token needed)
-
Summary:
- Shows comprehensive build status
- Links to PyPI package and GitHub release
- Shows source binary repository
# In sochdb/sochdb - first create a release there
git tag v0.3.2
git push origin v0.3.2
# Build and upload platform binaries to GitHub release
# Then in sochdb-python-sdk - run the workflow
# Go to: https://github.com/sochdb/sochdb-python-sdk/actions
# Run workflow with:
# version: 0.3.2
# sochdb_version: 0.3.2 (or leave blank to use same version)
# dry_run: false- Python SDK version matches SochDB core version
- Example: Both are
0.3.2 - Simplest for users to understand
- Python SDK has its own versioning
- Specify
sochdb_versionto pull specific binaries - Example: SDK is
1.0.0, pulls binaries from SochDB0.3.2
- Ensure the sochdb/sochdb release exists with the correct tag format (
v0.3.2) - Check that platform-specific archives are attached to the release
- This is now fixed! The workflow creates a GitHub release with all packages attached
- Check the Releases page
- Wheels are built as
py3-none-{platform}(platform-specific, not pure Python) - The workflow automatically renames wheels with correct platform tags
- Check the workflow logs under "Copy binaries and libraries to SDK"
- Verify the sochdb/sochdb release has the expected binary files in the archive
To test a release locally before publishing:
# Download a wheel from the workflow artifacts or GitHub release
pip install sochdb_client-0.3.2-py3-none-macosx_11_0_arm64.whl
# Verify binaries are included
python -c "import sochdb; print(sochdb.__file__)"
ls -la /path/to/site-packages/sochdb/_bin/
ls -la /path/to/site-packages/sochdb/lib/
# Test basic functionality
python -c "from sochdb import Database; db = Database.open(':memory:'); print('OK')"
# Test CLI tools
sochdb-bulk --help
sochdb-server --help- Verify sochdb/sochdb release exists with all platform binaries
- Update
versioninpyproject.tomlif needed - Run workflow with
dry_run: truefirst - Review workflow artifacts and logs
- Run workflow with
dry_run: falsefor production - Verify GitHub release is created
- Verify packages appear on PyPI
- Test installation:
pip install sochdb-client==X.Y.Z - Update CHANGELOG.md with release notes
- PyPI Package: https://pypi.org/project/sochdb-client/
- GitHub Releases: https://github.com/sochdb/sochdb-python-sdk/releases
- Main SochDB Repo: https://github.com/sochdb/sochdb
- SochDB Releases: https://github.com/sochdb/sochdb/releases