Check out :ref:`row-factory-create` for information about how to use these objects.
.. autofunction:: tuple_row
+
+ Example::
+
+ >>> cur = conn.cursor(row_factory=tuple_row)
+ >>> cur.execute("SELECT 10 AS foo, 'hello' AS bar").fetchone()
+ (10, 'hello')
+
.. autofunction:: dict_row
+
+ Example::
+
+ >>> cur = conn.cursor(row_factory=dict_row)
+ >>> cur.execute("SELECT 10 AS foo, 'hello' AS bar").fetchone()
+ {'foo': 10, 'bar': 'hello'}
+
.. autofunction:: namedtuple_row
+
+ Example::
+
+ >>> cur = conn.cursor(row_factory=namedtuple_row)
+ >>> cur.execute("SELECT 10 AS foo, 'hello' AS bar").fetchone()
+ Row(foo=10, bar='hello')
+
.. autofunction:: scalar_row
- .. versionadded:: 3.2
+ Example::
+
+ >>> cur = conn.cursor(row_factory=scalar_row)
+ >>> cur.execute("SELECT 10 AS foo, 'hello' AS bar").fetchone()
+ 10
+
+ .. versionadded:: 3.2
.. autofunction:: class_row