Skip to main content

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

Metadata

Release files for oaas_grpc_compiler 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oaas_grpc_compiler 1.0.1
File Size Uploaded
oaas_grpc_compiler-1.0.1.tar.gz 3.2 kB Details

Release files / oaas_grpc_compiler-1.0.1.tar.gz

Download URL oaas_grpc_compiler-1.0.1.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3aac3ebe1de5c1b96f96cc676d83dd917ff250dc5cc718fbac50a6d03c7a609f
BLAKE2b-256 checksum
How to use checksums
fb7f9c76772686f86104afe081ccf77f51085bddfd6c7128786811bb902454d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.8

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page