Skip to main content

oaas_grpc_compiler

Project description

oaas-grpc-compiler compiles gRPC proto files, with type information that can be verified using mypy, formatted with black, with the possibility of custom modules where the sources to be generated in.

The add_Type_to_server function is moved into the Servicer type as a static method: Type.add_to_server, because this is how OaaS can figure out if this is a gRPC service, or a simple service.

Usage

Usage: oaas-grpc-compiler [OPTIONS] GRPC_FILES

Options:
  --module TEXT  The module of the python package to generate
  --output TEXT  Output folder where to write the files
  --help         Show this message and exit.

Example

Proto file test.proto:

syntax = "proto3";


message Ping {
  string text = 1;
}

message Pong {
  string text = 1;
  int32 len = 2;
}

service TestService {
  rpc ping(Ping) returns (Pong) {}
  rpc ping_copy(Ping) returns (Pong) {}
  rpc ping_exception(Ping) returns (Pong) {}
}

Invocation:

oaas-grpc-compiler --module some.custom.module --output some/custom/module test.proto

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oaas_grpc_compiler-1.0.1.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file oaas_grpc_compiler-1.0.1.tar.gz.

File metadata

  • Download URL: oaas_grpc_compiler-1.0.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.8

File hashes

Hashes for oaas_grpc_compiler-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3aac3ebe1de5c1b96f96cc676d83dd917ff250dc5cc718fbac50a6d03c7a609f
MD5 ecd06bb6e8e29dbfc59749fd19a26ed2
BLAKE2b-256 fb7f9c76772686f86104afe081ccf77f51085bddfd6c7128786811bb902454d7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page