A Python library implementing a generic promises facility