Search notes:
Python standard library: ftplib
#!/usr/bin/python3
import os
import ftplib
ftp = ftplib.FTP('remote-server.xy')
ftp.login('renenyffenegger', os.environ['FTP_PASSWORD'])
ftp.cwd('/path/to/directory')
file_name = 'script.php'
with open(file_name, 'rb') as file:
ftp.storbinary(f'STOR {file_name}', file)
ftp.quit()
Module members
_150_re | NoneType object |
_227_re | NoneType object |
all_errors | tuple object |
B_CRLF | bytes object |
CRLF | str object |
Error | ftplib.Error class |
error_perm | ftplib.error_perm class |
error_proto | ftplib.error_proto class |
error_reply | ftplib.error_reply class |
error_temp | ftplib.error_temp class |
FTP | ftplib.FTP class |
ftpcp() | Function |
FTP_PORT | int object |
FTP_TLS | ftplib.FTP_TLS class |
_GLOBAL_DEFAULT_TIMEOUT | object object |
MAXLINE | int object |
MSG_OOB | int object |
parse150() | Function |
parse227() | Function |
parse229() | Function |
parse257() | Function |
print_line() | Function |
socket | Module |
ssl | Module |
_SSLSocket | ssl.SSLSocket class |
sys | Module |
test() | Function |
Members of the FTP class
abort() | |
acct() | |
af | ? |
close() | |
connect() | |
cwd() | |
debug() | |
debugging | int |
delete() | |
dir() | |
encoding | str |
file | ? |
getline() | |
getmultiline() | |
getresp() | |
getwelcome() | |
host | str |
lastresp | str |
login() | |
makepasv() | |
makeport() | |
maxline | int |
mkd() | |
mlsd() | |
nlst() | |
ntransfercmd() | |
passiveserver | int |
port | int |
putcmd() | |
putline() | |
pwd() | |
quit() | |
rename() | |
retrbinary() | |
retrlines() | |
rmd() | |
sanitize() | |
sendcmd() | |
sendeprt() | |
sendport() | |
set_debuglevel() | |
set_pasv() | |
size() | |
sock | ? |
source_address | NoneType |
storbinary() | |
storlines() | |
timeout | object |
transfercmd() | |
voidcmd() | |
voidresp() | |
welcome | str |