expose push and pop via a Python api