sqlc as a pip-installable package. Installs the official sqlc release binaries — no Go toolchain required.
sqlc generates fully type-safe code from SQL. This package exists so Python projects (and anyone without Go installed) can get the sqlc CLI straight from PyPI and pin it like any other dependency.
# with uv
uv add --dev sqlc-bin # as a project dev dependency
uv tool install sqlc-bin # as a global tool
# with pip
pip install sqlc-bin
# with pipx
pipx install sqlc-bin
# run without installing
uvx --from sqlc-bin sqlc versionExactly like a go installed sqlc — the sqlc command is on your PATH:
sqlc version
sqlc init
sqlc generateIt also works as a Python module:
python -m sqlc_bin generateSee the sqlc documentation for everything the CLI can do.
| OS | x86_64 | arm64 |
|---|---|---|
| Linux (glibc and musl) | ✅ | ✅ |
| macOS 11+ | ✅ | ✅ |
| Windows | ✅ | ✅ |
Each platform gets its own wheel with the matching binary inside; pip/uv picks the right one automatically. On any other platform, installation falls back to the sdist, which downloads the binary for the host at build time (and fails clearly if sqlc doesn't publish one).
- Wheels bundle the unmodified official binaries from sqlc's GitHub releases.
- Every downloaded archive is verified against sha256 checksums pinned in
checksums.jsonbefore packaging. - The
sqlcentry pointexecs the bundled binary (POSIX) or forwards to it as a subprocess (Windows), so arguments, stdio, exit codes, and signals behave like the real thing — because it is the real thing.
The package version tracks the sqlc version: sqlc-bin==1.31.1 ships sqlc v1.31.1. Packaging-only fixes are published as post-releases (1.31.1.post1) containing the same binary.
uv sync # set up the dev environment
uv build --wheel # build a wheel for your platform
SQLC_BIN_TARGET=windows_arm64 uv build --wheel # cross-build for another target
uv run --with dist/*.whl pytest # tests run against an installed wheel
uv run --no-project scripts/bump_sqlc.py # update to the latest sqlc releaseReleases are built and published to PyPI by GitHub Actions (.github/workflows/release.yml) on version tags, using trusted publishing. A daily workflow checks for new sqlc releases and opens a bump PR.
This packaging project is MIT-licensed. sqlc itself is MIT-licensed by its authors; the binaries are redistributed unmodified. This project is not affiliated with or endorsed by the sqlc authors.