title: How do I get the name of a Cassandra cluster, using the Python driver?
body: <p>When I connect to Cassandra using <code>cqlsh</code>, it tells me the name of the Cassandra cluster I'm connected to.</p>
  
  <pre><code>$ cqlsh
  Connected to Test Cluster at 127.0.0.1:9042.
  [cqlsh 5.0.1 | Cassandra 3.11.2 | CQL spec 3.4.4 | Native protocol v4]
  Use HELP for help.
  cqlsh&gt;
  </code></pre>
  
  <p>(In this example the cluster name is <code>Test Cluster</code>, and it appears in blue on my screen.)</p>
  
  <p>How do I get the cluster name from within my Python code, using the Python Cassandra driver? I expected to be able to get this information from the <code>Session</code> object, but I cannot see anything in <a href="http://datastax.github.io/python-driver/api/cassandra/cluster.html" rel="nofollow noreferrer">the documentation</a>.</p>
  
  <p>(My use case is part of a belt-and-braces approach to prevent tests from being run against production Cassandras. The idea is that if the server name indicates that the tests have connected to a production Cassandra somehow, they can abort ASAP.)</p>