title: converting python dict to protobuf
body: <p>How can I convert the following dict to protobuf ?<br />
  I have to send a protobuf as a payload to an mqtt broker.
  I'm using python 3.8</p>
  <pre><code>publish_msg = {
          &quot;token&quot;:&quot;xxxxxxxx&quot;,
          &quot;parms&quot;:{
              &quot;fPort&quot;:8,
              &quot;data&quot;:b&quot;MDQzYzAwMDE=&quot;,
              &quot;confirmed&quot;:False,
              &quot;devEUI&quot;:&quot;8CF9572000023509&quot;
          }
      }
  </code></pre>
  <p>My protobuf is defined as follows:</p>
  <pre><code>syntax = &quot;proto3&quot;;
  package publish;
  
  
  message DLParams{
      string DevEUI = 1;
      int32 FPort = 2;
      bytes Data = 3;
      bool Confirm = 4;
  }
  
  message DeviceDownlink {
      string Token = 1;
      DLParams Params = 2;
  }
  </code></pre>