With Testinfra you can write unit tests in Python to test the actual state of your servers configured by management tools like Salt, Ansible, Puppet, Chef and so on. Testinfra aims to be a Serverspec equivalent in python and is written as a plugin to the powerful Pytest test engine. By default Testinfra launches tests on the local machines, but you can also test remotes systems using paramiko.
PySSH is a Python module for programmatically controlling ssh and scp. NOTE: This project is no longer maintained. Please consider using Paramiko (https://github.com/paramiko/paramiko) instead.