title: How to list the most compute instances' info for a project in GCP?
body: <p>I am trying to list all VMs that exist under all projects associated with my account, <strong>including their OS</strong> and any other tag I can find. I have a list with the projects already so what I am using is:</p>
  <pre><code> for project in project_df[&quot;project_id&quot;]:
      subprocess.run([&quot;gcloud config set project {}&quot;.format(project)], shell=True)
      cp = subprocess.run([&quot;gcloud compute instances os-inventory list-instances&quot;], shell=True)
      print(cp)
  </code></pre>
  <p>This does work, but the only labels I get are:</p>
  <pre><code>NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP EXTERNAL_IP STATUS
  </code></pre>
  <p>How can I get the OS of the VMs? And possible more tags? I tried using:
  GET <a href="https://compute.googleapis.com/compute/v1/projects/%7Bproject%7D/aggregated/instances" rel="nofollow noreferrer">https://compute.googleapis.com/compute/v1/projects/{project}/aggregated/instances</a>, without success since I couldn't make <code>requests</code> or <code>urllib</code> work with it.</p>
  <p>Is there any other python library from the sdk or another gcloud command that I am missing?</p>
  <p>Thanks</p>