gRPC Poetry plugin
Project description
Poetry gRPC plugin
A Poetry plugin to run the Protocol Buffers compiler with gRPC support.
Installing the plugin
Requires Poetry version 1.2.0
or above
poetry self add poetry-grpc-plugin
Usage
To run it manually:
poetry help protoc
Usage:
protoc [options]
Options:
--proto_path[=PROTO_PATH] Base path for protobuf resources. [default: "<module_name>"]
--python_out[=PYTHON_OUT] Output path for generated protobuf wrappers. [default: "."]
--grpc_python_out[=GRPC_PYTHON_OUT] Output path for generated gRPC wrappers. Defaults to same path as python_out.
--mypy_out[=MYPY_OUT] Output path for mypy type information for generated protobuf wrappers. Defaults to same path as python_out.
--mypy_grpc_out[=MYPY_GRPC_OUT] Output path for mypy type information for generated gRPC wrappers. Defaults to same path as grpc_python_out.
--venv_proto_paths[=VENV_PROTO_PATHS] Additional protobuf resources paths, from the plugin's venv. Defaults to None.
...
Run on poetry update
[tool.poetry-grpc-plugin]
Additional config
[tool.poetry-grpc-plugin]
proto_path = "protos" # Defaults to module name
python_out = "." # Defaults to .
venv_proto_paths = ["google/type"] # Defaults to None
Settings in pyproject.toml
will be used as defaults for manual execution with poetry protoc
.
Using venv_proto_paths
, one can import additional protos from packages installed in the same virtual environment as this plugin. For example:
pipx inject poetry googleapis-common-protos
[tool.poetry-grpc-plugin]
...
venv_proto_paths = ["google/type"] # Defaults to None
Then in your proto file you can do:
import "latlng.proto";
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file poetry_grpc_plugin-0.1.9.tar.gz
.
File metadata
- Download URL: poetry_grpc_plugin-0.1.9.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9c494c572e2b225d26c7ad5ad2b4809a478a851a4e53ef2c68376258c64c06a |
|
MD5 | 41d6a77c4d1139e1f040f23d4c715ddb |
|
BLAKE2b-256 | efe917e59b16214b42b29697960abc9afdb79f1a86353e8d6294c8d3bcb87f66 |
File details
Details for the file poetry_grpc_plugin-0.1.9-py3-none-any.whl
.
File metadata
- Download URL: poetry_grpc_plugin-0.1.9-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2490d85f8dcbec63daff60fcbe2312afe7041ff30e2b196d9ea6eb6dafc92518 |
|
MD5 | cb8d5442bf5baa73fce3aabe39366730 |
|
BLAKE2b-256 | 92bd22c8f8cc6607a62878306a86a153cb8a63e182919da67aa2cd5162acd48d |