From a68f116b3d10d911eb98278e33a5b97183bce194 Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 24 Jul 2026 02:21:13 +0200 Subject: [PATCH] docs: mention that sqlc is pip-installable via sqlc-bin Point the README, the getting-started prerequisites, and the contributor prerequisites at the sqlc-bin PyPI package, which ships the unmodified official sqlc binaries so no Go toolchain is needed and the sqlc version can be pinned like any other Python dependency. --- CONTRIBUTING.md | 3 +++ README.md | 8 ++++++++ docs/content/docs/getting-started.md | 8 ++++++++ 3 files changed, 19 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cead3bef..eba2f621 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,6 +11,9 @@ that you should follow to ensure that your contribution is at its best. - [**sqlc**](https://docs.sqlc.dev/en/latest/overview/install.html) on your PATH, in the version CI pins (`sqlc-version` in `.github/workflows/ci.yml`). The sqlc version is stamped into every generated file header, so a different version diffs all fixtures. + The easiest way to get exactly that version without a Go toolchain is + [sqlc-bin](https://pypi.org/project/sqlc-bin/), whose package version tracks the + sqlc version: `uv tool install "sqlc-bin==1.31.1"`. - **Docker** (or a local PostgreSQL) - only needed for the runtime tests. One-time setup for the Python tooling: diff --git a/README.md b/README.md index fb4dc2c2..abec7963 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,14 @@ A WASM plugin for SQLC allowing the generation of Python code. The generated code requires **Python 3.12 or newer** (it uses PEP 695 type aliases and generics, and `enum.StrEnum`). +> [!TIP] +> Besides the [official installation methods](https://docs.sqlc.dev/en/latest/overview/install.html), +> the `sqlc` CLI itself is also pip-installable via +> [`sqlc-bin`](https://pypi.org/project/sqlc-bin/), which ships the unmodified +> official binaries - no Go toolchain required: `pip install sqlc-bin` (or +> `uv add --dev sqlc-bin`) puts `sqlc` on your PATH, pinnable like any other +> Python dependency. + ## Documentation **https://rayakame.github.io/sqlc-gen-better-python/** diff --git a/docs/content/docs/getting-started.md b/docs/content/docs/getting-started.md index 3e6c8365..e3647675 100644 --- a/docs/content/docs/getting-started.md +++ b/docs/content/docs/getting-started.md @@ -16,6 +16,14 @@ You need [`sqlc`](https://docs.sqlc.dev/en/latest/overview/install.html) on your `PATH` and **Python 3.12 or newer** (the generated code uses PEP 695 type aliases and generics, and `enum.StrEnum`). +{{< callout type="info" >}} + Besides the official installation methods, sqlc is also pip-installable via + [sqlc-bin](https://pypi.org/project/sqlc-bin/), which ships the unmodified + official binaries - no Go toolchain required. `uv add --dev sqlc-bin` (or + `pip install sqlc-bin`) puts `sqlc` on your PATH, and the package version + tracks the sqlc version, so you can pin it like any other dependency. +{{< /callout >}} + Then install the database driver you want to use: {{< tabs >}}