title: google-cloud get instance id and zone with python api
body: <p>How can I get the current running instanceId, and it's zone in the running Python application.</p>
  
  <p>In Go and Java it's done in the following way, what is the equivilant in Python?</p>
  
  <p>Go,</p>
  
  <pre><code>import metadata "cloud.google.com/go/compute/metadata"
  
  func main(){
      println(metadata.InstanceID))
  }
  </code></pre>
  
  <p>Java</p>
  
  <pre><code>String instanceId = com.google.cloud.MetadataConfig.getInstanceId()
  </code></pre>