Make table row behave more like a dict

The docs say " Row Objects behave like Python dictionaries.". Well, a bit yes, but it is missing some vital parts:

  • it would be useful to have access methods like: keys(), values(), items()
  • it would be useful to access row values with a .get(fieldname, default)

It would also be nice to be able to cast a row to a dict, but that seems to be difficult: What does SuspensionError mean?

Also using table.list_columns (as a workaround for .keys()) does not work on the client.

1 Like

Here’s what the suspension error is about and how you cast a row to a dict: