title: How to set a timeout for a pymysql query
body: <p>I have a situation where a pymysql query may take longer than the amount of time allowed. Ideally, the call aborts with an exception after a set number of seconds or mills, so it can be reported and move forward.</p>
  
  <p>Is there a way to limit the amount of time a query can execute for a given session/connection?</p>