bazel/python_rules.bzl
def py_grpc_library(
        name,
        srcs,
        deps,
        strip_prefixes = [],
        **kwargs):
    """Generate python code for gRPC services defined in a protobuf.

    Args:
      name: The name of the target.
      srcs: (List of `labels`) a single proto_library target containing the
        schema of the service.
      deps: (List of `labels`) a single py_proto_library target for the
        proto_library in `srcs`.
      strip_prefixes: (List of `strings`) If provided, this prefix will be
        stripped from the beginning of foo_pb2 modules imported by the
        generated stubs. This is useful in combination with the `imports`
        attribute of the `py_library` rule.
      **kwargs: Additional arguments to be supplied to the invocation of
        py_library.
    """
    if len(srcs) != 1:
        fail("Can only compile a single proto at a time.")

    if len(deps) != 1:
        fail("Deps must have length 1.")

    _generate_pb2_grpc_src(
        name = name,
        deps = srcs,
        py_deps = deps,
        strip_prefixes = strip_prefixes,
        **kwargs
    )
Generate python code for gRPC services defined in a protobuf.

    Args:
      name: The name of the target.
      srcs: (List of `labels`) a single proto_library target containing the
        schema of the service.
      deps: (List of `labels`) a single py_proto_library target for the
        proto_library in `srcs`.
      strip_prefixes: (List of `strings`) If provided, this prefix will be
        stripped from the beginning of foo_pb2 modules imported by the
        generated stubs. This is useful in combination with the `imports`
        attribute of the `py_library` rule.
      **kwargs: Additional arguments to be supplied to the invocation of
        py_library.
    
Generate python code for gRPC services defined in a protobuf.
Generate python code for gRPC services defined in a protobuf .
def py_grpc_library(
        name,
        srcs,
        deps,
        strip_prefixes = [],
        **kwargs):
    if len(srcs) != 1:
        fail("Can only compile a single proto at a time.")
    if len(deps) != 1:
        fail("Deps must have length 1.")
    _generate_pb2_grpc_src(
        name = name,
        deps = srcs,
        py_deps = deps,
        strip_prefixes = strip_prefixes,
        **kwargs
    )
def py_grpc_library ( name , srcs , deps , strip_prefixes = [ ] , ** kwargs ) : if len ( srcs ) != 1 : fail ( "Can only compile a single proto at a time." ) if len ( deps ) != 1 : fail ( "Deps must have length 1." ) _generate_pb2_grpc_src ( name = name , deps = srcs , py_deps = deps , strip_prefixes = strip_prefixes , ** kwargs )
Generate python code for gRPC services defined in a protobuf.
Generate python code for gRPC services defined in a protobuf .
"""Generate python code for gRPC services defined in a protobuf.

    Args:
      name: The name of the target.
      srcs: (List of `labels`) a single proto_library target containing the
        schema of the service.
      deps: (List of `labels`) a single py_proto_library target for the
        proto_library in `srcs`.
      strip_prefixes: (List of `strings`) If provided, this prefix will be
        stripped from the beginning of foo_pb2 modules imported by the
        generated stubs. This is useful in combination with the `imports`
        attribute of the `py_library` rule.
      **kwargs: Additional arguments to be supplied to the invocation of
        py_library.
    """
name
The name of the target.
The name of the target .
srcs
(List of `labels`) a single proto_library target containing the
schema of the service.
( List of ` labels ` ) a single proto_library target containing the schema of the service .
deps
(List of `labels`) a single py_proto_library target for the
proto_library in `srcs`.
( List of ` labels ` ) a single py_proto_library target for the proto_library in ` srcs ` .
strip_prefixes
(List of `strings`) If provided, this prefix will be
stripped from the beginning of foo_pb2 modules imported by the
generated stubs. This is useful in combination with the `imports`
attribute of the `py_library` rule.
( List of ` strings ` ) If provided this prefix will be stripped from the beginning of foo_pb2 modules imported by the generated stubs . This is useful in combination with the ` imports ` attribute of the ` py_library ` rule .
**kwargs
Additional arguments to be supplied to the invocation of
py_library.
Additional arguments to be supplied to the invocation of py_library .