How to create snapshot via Python module