Asynchronous library for FTP-based file system operations.
Since this library relies on cURL and PycURL, you are to install the necessary system packages before proceeding with the installation:
# On Ubuntu:
set -ex \
&& sudo apt-get update --yes \
&& sudo apt-get install --yes \
curl \
libcurl4-openssl-dev \
libssl-dev \
&& sudo apt-get clean \
&& sudo rm --recursive --force /var/lib/apt/lists/*
# On Fedora:
set -ex \
&& sudo dnf update --assumeyes \
&& sudo dnf install --assumeyes \
curl \
libcurl-devel \
openssl-devel \
&& sudo dnf clean allUse pip to install pyftpkit together with its command-line interface by running the following command:
python3 -m pip install --user pyftpkitHere is a list of examples demonstrating the library's usage across various covered scenarios:
Here is a simple example demonstrating how to upload and download data to and from an FTP server using the command-line interface provided by this library:
# The library provides two main commands -- one for uploading and one for downloading data.
# It is recommended to create a local wrapper script to simplify running this command.
docker run \
--interactive \
--network=host \
--rm \
--tty \
--user="$(id -u):$(id -g)" \ # to avoid permission issues on mounted volumes
--volume="$(pwd):$(pwd)" \
--volume=/tmp:/tmp \ # this is for the logging system
--workdir="$(pwd)" \
"docker.io/vladpunko/pyftpkit:${IMAGE_TAG:?err}" "$@"To simplify configuration, the library automatically loads FTP server settings from a .env file located in the current working directory.
Pull requests are welcome. Please open an issue first to discuss what should be changed.
Please make sure to update tests as appropriate.
# Step -- 1.
python3 -m venv .venv && source ./.venv/bin/activate && pip install pre-commit tox
# Step -- 2.
pre-commit install --config .githooks.yml
# Step -- 3.
tox && tox -e lint