Member-only story
Recently, I needed to download the latest version of software from a ftp server then install it into tested machine.
I think there might be someone would need to know this so today I’m gonna share with you how to download data from ftp server with Python.
The following post might be how to install the app automatically.
I.What is ftp server:
You might want to read this but basically ftp server is where you store the files
II.FTPlib in Python:
You might want to go to official doc for ftplib in here
We’re gonna use ftplib to interact with ftp server
III.Real world example:
Below is a sample working ftp server
The scenario is this, we need to go to that server, find the latest version of file, and download it.
If the latest version of file is already downloaded, no need to download it again.
1.Store the downloaded version name into yaml file:
Sample configuration file where we have coccoc_dev_version
#configurations.yaml
---
coccoc_dev_version: 79.0.3945.98
jenkins:
admin_password: '123456'
admin_username: admin
domain…