One option is to disable the host key requirement:
import pysftp
cnopts = pysftp.CnOpts()
cnopts.hostkeys = None
with pysftp.Connection(host, username, password, cnopts=cnopts) as sftp:
sftp.put(local_path, remote_path)
You can find more info about that here: https://stackoverflow.com/a/38355117/1060738
Important note:
By setting cnopts.hostkeys=None
you'll lose the protection against Man-in-the-middle attacks by doing so. Use @martin-prikryl answer to avoid that.