title: pymssql how to remove data type in queried result
body: <p>I use pymssql library to query the result, here is one example:</p>
  
  <blockquote>
    <p>('999001', '4871C9DF-6E95-458B-B763-6BBBB6C75F5D', 1, True, 2, 'EOI', 'Dropped', None, None, 4, False, False, 'Enbloc', False, False, False, False, None, None, 'USD', None, None, None, None, None, None, 'Investment', None, None, None, 'JLL Deal', 'Exclusive Mandated', 'Sales Advisory', None, None, None, None, None, 'Korea Standard Time', None, None, None, None, None, None, None, None, None, 1, None, True, 'En-bloc', False, False, False, False, False, False, None, '1', None, None, None, None, None, None, Decimal('0.05'), '100%', None, None, None, None, None, 'Sqft', 'USD', Decimal('120000000.00'), 'USD$ 120.0M', Decimal('120000000.00'), 'USD$ 120.0M', None, None, None, None, None, None, None, None, None, None, Decimal('120000000.00'), Decimal('120000000.00'), Decimal('120000000.00'), Decimal('120000000.00'), 'Undisclosed', 'Hubville Co Ltd', 'An Exciting Investment Opportunity - The Gateway to Seoul', None, None, None, None, 'An Exciting Investment Opportunity - The Gateway to Seoul', None, None, datetime.datetime(2016, 1, 15, 0, 5, 51, 480000), datetime.datetime(2016, 12, 7, 5, 6, 52, 633000), 1, None)</p>
  </blockquote>
  
  <p>But I found there are values like <code>Decimal('120000000.00')</code> and <code>datetime.datetime(2016, 1, 15, 0, 5, 51, 480000)</code>. I only want to get the raw value without Decimal() and datetime.datetime(). How can I implement this?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>def extract_opportunities(sql):
      cursor.execute(sql)
      opportunities = cursor.fetchall()
      attributes = get_attributes_of_table(cursor)
      availability_id_idx = attributes.index("availabilityid")
      opportunity_dict = dict()
      for idx, val in enumerate(opportunities):
          opportunity_key = val[availability_id_idx]
          opportunity_value = dict(zip(attributes, val))
          opportunity_dict[opportunity_key] = opportunity_value
  </code></pre>
  
  <p>The purpose of this function is to construct a JSON format file with attribute and value pairs, like:</p>
  
  <pre><code>{'Price': '120000000.00'} 
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>{'Price': Decimal('120000000.00')}
  </code></pre>