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
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
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3aac3ebe1de5c1b96f96cc676d83dd917ff250dc5cc718fbac50a6d03c7a609f |
|
MD5 | ecd06bb6e8e29dbfc59749fd19a26ed2 |
|
BLAKE2b-256 | fb7f9c76772686f86104afe081ccf77f51085bddfd6c7128786811bb902454d7 |