generic transaction implementation for Python
