Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/**
Expand Down
8 changes: 8 additions & 0 deletions docs/content/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 >}}
Expand Down
Loading