It depends on what package you use to connect to SFTP. For example pysftp hasĀ
pysftp.Connection.listdir()
also you may want to use watchdog to monitor for file system changes
here is an example code for sync local and remote (sftp server).
https://codereview.stackexchange.com/que...local-ones
EDIT: I see the example is the other way sync from local to remote and you want the opposite
just google
pysftp.Connection.listdir()
also you may want to use watchdog to monitor for file system changes
here is an example code for sync local and remote (sftp server).
https://codereview.stackexchange.com/que...local-ones
EDIT: I see the example is the other way sync from local to remote and you want the opposite
just google
watchdog python ftp