title: How do I use SQL parameters with python?
body: <p>I am using python 2.7 and <a href="http://code.google.com/p/pymssql/" rel="noreferrer">pymssql 1.9.908</a>.</p>
  
  <p>In .net to query the database I would do something like this:</p>
  
  <pre><code>using (SqlCommand com = new SqlCommand("select * from Customer where CustomerId = @CustomerId", connection))
  {
      com.Parameters.AddWithValue("@CustomerID", CustomerID);
      //Do something with the command
  }
  </code></pre>
  
  <p>I am trying to figure out what the equivalent is for python and more particularly pymssql.  I realize that I could just do string formatting, however that doesn't seem handle escaping properly like a parameter does (I could be wrong on that).</p>
  
  <p>How do I do this in python?</p>