Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a python ftp library for uploading whole directories (including subdirectories)?

Tags:

python

ftp

So I know about ftplib, but that's a bit too low for me as it still requires me to handle uploading files one at a time as well as determining if there are subdirectories, creating the equivalent subdirectories on the server, cd'ing into those subdirectories and then finally uploading the correct files into those subdirectories. It's an annoying task that I'd rather avoid if I can, what with writing tests, setting up test ftp servers etc etc..

Any of you know of a library (or mb some code scrawled on the bathroom wall..) that takes care of this for me or should I just accept my fate and roll my own?

Thanks

like image 375
Silfheed Avatar asked Dec 09 '22 20:12

Silfheed


1 Answers

The ftputil Python library is a high-level interface to the ftplib module.

Looks like this could help. ftputil website

like image 164
Deinumite Avatar answered Feb 14 '23 02:02

Deinumite