Rename to straight hrpc package side and reset

This commit is contained in:
Luke Murphy
2020-08-13 19:29:14 +02:00
parent 3f690fefa1
commit f7f283cf89
12 changed files with 16 additions and 1089 deletions

View File

@ -1 +0,0 @@
"""hrpc module."""

View File

@ -1,24 +0,0 @@
"""Simple RPC with Protobuf Services."""
from argparse import ArgumentParser, FileType
from shlex import split
from subprocess import run
def main():
"""Command-line entrypoint."""
parser = ArgumentParser(description="Generate hrpc service and stubs")
parser.add_argument("protobuf", type=FileType("r"), help="protobuf file")
args = parser.parse_args()
generate(args)
def generate(args):
"""Generate services and stubs."""
cmd = (
"python -m grpc_tools.protoc "
"--purerpc_out=. "
"--python_out=. "
"-I. "
f"{args.protobuf.name}"
)
run(split(cmd))