@@ -45,10 +45,6 @@ With a protobuf definition in hand, you can generate stub code. This is
4545easiest using buf, but you can also use protoc if you're feeling
4646masochistic.
4747
48- Install the compiler (e.g. ` pip install protoc-gen-connect-python ` ), and
49- it can be referenced as ` protoc-gen-connect-python ` . Alternatively, download
50- a precompiled binary from the [ releases] ( https://github.com/connectrpc/connect-python/releases ) .
51-
5248A reasonable ` buf.gen.yaml ` :
5349
5450``` yaml
@@ -58,10 +54,22 @@ plugins:
5854 out : .
5955 - remote : buf.build/protocolbuffers/pyi
6056 out : .
57+ - remote : buf.build/connectrpc/python
58+ out : .
59+ ` ` `
60+
61+ Or, you can install the compiler (e.g. ` pip install protoc-gen-connect-python`), and
62+ it can be referenced as `protoc-gen-connect-python`.
63+ Then, you can use `protoc-gen-connect-python` as a local plugin :
64+
65+ ` ` ` yaml
6166 - local: .venv/bin/protoc-gen-connect-python
6267 out: .
6368` ` `
6469
70+ Alternatively, download a precompiled binary from the
71+ [releases](https://github.com/connectrpc/connect-python/releases).
72+
6573` protoc-gen-connect-python` is only needed for code generation. Your actual
6674application should include `connect-python` as a dependency for the runtime
6775component.
@@ -410,25 +418,8 @@ Set up a virtual env:
410418uv sync
411419` ` `
412420
413- Then, use `uv run just check` to do development checks :
414-
415- ` ` ` console
416- $ uv run just --list
417- Available recipes:
418- all # Run all checks (format, check, mypy, test, integration-test)
419- check # Check code with ruff linter
420- conformance-test *ARGS # Run conformance tests (requires connectconformance binary). Usage: uv run just conformance-test [ARGS...]
421- fix # Fix auto-fixable ruff linter issues
422- format # Format code with ruff
423- integration-test # Run integration test against demo.connectrpc.com
424- mypy # Run mypy type checking
425- mypy-package
426- mypy-tests
427- protoc-gen *ARGS # Run protoc with connect_python plugin (development mode). usage: uv run just protoc-gen [PROTOC_ARGS...]
428- test # Run tests
429- ` ` `
430-
431- For example, `uv run just check` will lint code.
421+ Then, use `uv run just` to do development checks, or check out `uv run just --list` for other targets.
422+ ` just` is run via `uv` as a development dependency, but you can also install it globally and omit the `uv run` from the commands.
432423
433424# # Status
434425
0 commit comments