diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc
index 0fac1b88cd93692a86d328ba6c8352cefc86dbca..4841da8da8e8529f85966081e9d193b1b8bc2451 100644
--- a/src/compiler/python_generator.cc
+++ b/src/compiler/python_generator.cc
@@ -724,6 +724,9 @@ pair<bool, grpc::string> PrivateGenerator::GetGrpcServices() {
     out = &out_printer;
 
     if (generate_in_pb2_grpc) {
+      out->Print(
+          "# Generated by the gRPC Python protocol compiler plugin. "
+          "DO NOT EDIT!\n");
       if (!PrintPreamble()) {
         return make_pair(false, "");
       }