You don't even need to expunge the object, as TurboGears provides a transaction manager you can just doom the transaction so that TurboGears will throw it away instead of committing the changes:
import transaction
@expose('mytemplate')
def my_controller(self):
object = model.DBSession.query(model.Object).filter_by( field = value ).first()
object.field = 'Hello'
transaction.doom() # This will prevent changes to be committed.
return dict(value=object.field)
To disable it for the whole project edit config/app_cfg.py
and add:
base_config.use_transaction_manager = False