from grpc_tools import protoc protoc.main(( '', '-I.', # Import paths '--python_out=.', # Output directory 'message.proto', # Proto file ))