Your idea of using a separate Python package and a go module for the
generated code is likely the best approach here. That is, the
following directory structure:
- service-defs - here you have the protobufs. The generated code will
live in their own sub-directories and will be version controlled
(perhaps in a separate repo). However, you should publish the Python
package for the Python code and a go module for the go code from here.
For local development, you of course don't need to publish your
packages. The key is that the generated code should be accessed as
packages and the generated code should live in a single place.
- server - Your Python server code which imports the package
containing the generated code, version controlled and perhaps a
separate repo
- client - Your Go client which imports the Go module containing the
generated code, version controlled and perhaps a separate repo
I mention the word "perhaps" with a separate repo since, if you are
just starting out and want to keep things simple, you can have all of
them in a single repo, but the accessing mechanisms should be via
Python package and go modules. That way, if you have to move them to
separate repos, your code doesn't need changing. Your local
development workflow may need changing, but otherwise you will be
good.
>
> --
> You received this message because you are subscribed to the Google Groups "
grpc.io" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
grpc-io+u...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/grpc-io/1d6ecb8e-1c27-43ef-8491-fd65de65d111n%40googlegroups.com.