Socket
Book a DemoInstallSign in
Socket

pyftpkit

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pyftpkit

Asynchronous library for FTP-based file system operations

pipPyPI
Version
0.1.1
Maintainers
1

pyftpkit

hooks tests

Asynchronous library for FTP-based file system operations.

Installation

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 all

Use pip to install pyftpkit together with its command-line interface by running the following command:

python3 -m pip install --user pyftpkit

Basic usage

Here 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.
# Since both share the same interface, you can switch between them simply by changing
# the command name in the command-line interface.
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}" upload --src ./examples/* --dst '/'

To simplify configuration, the library automatically loads FTP server settings from a .env file located in the current working directory.

Contributing

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

License

MIT

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts