Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

poetry-grpc-plugin

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

poetry-grpc-plugin

gRPC Poetry plugin

  • 0.1.9
  • PyPI
  • Socket score

Maintainers
1

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";

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc