Skip to main content

This project/library contains common elements related to FTP connections...

Project description

This project/library provides a comprehensive set of common components and interfaces designed to facilitate and streamline FTP connections, ensuring efficient communication and data transfer…


Python Versions License Pipeline Status Docs Status Security

Execution Environment

Install libraries

pip install --upgrade pip
pip install virtualenv

Create the Python Virtual Environment.

virtualenv --python={{python-version}} .venv
virtualenv --python=python3.11 .venv

Activate the Virtual Environment.

source .venv/bin/activate

Install required libraries.

pip install .

Check tests and coverage.

python manager.py run-tests
python manager.py run-coverage

How to Use

Installation.

pip install core-ftp

Examples.

from core_ftp.clients.sftp import SftpClient

with SftpClient("test.rebex.net", 22, "demo", "password") as client:
    for x in client.list_files("/"):
        print(x)
from core_ftp.clients.sftp import SftpClient

with SftpClient(
        host="localhost", port=23,
        user="foo", private_key_path="key_path") as client:

    for x in client.list_files("/"):
        print(x)

Docker

You can use docker to create an SFTP server to test the client using the functional tests via command python manager.py run-tests –test-type functional –pattern “*.py” and the following docker image: <atmoz/sftp> (https://hub.docker.com/r/atmoz/sftp/).

Authentication via user & password.

docker run \
  -v ./tests/resources/upload:/home/foo/upload:rw \
  -p 22:22 -d atmoz/sftp foo:pass:::upload

Authentication via SSH key.

docker run \
  -v ./tests/resources/ssh_keys/id_rsa.pub:/home/foo/.ssh/keys/id_rsa.pub:ro \
  -v ./tests/resources/upload:/home/foo/upload:rw \
  -p 23:22 -d atmoz/sftp foo::1001

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

core_ftp-2.0.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

core_ftp-2.0.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file core_ftp-2.0.0.tar.gz.

File metadata

  • Download URL: core_ftp-2.0.0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for core_ftp-2.0.0.tar.gz
Algorithm Hash digest
SHA256 8f2de13b2bb520117a50d257c6ac758a2df77516c30121a714924cdaa0417a72
MD5 2e1d7b0b2425729e2df405b2d5d55c97
BLAKE2b-256 183bb552bc845a916568b8ea2971f65158670231de850d650c0ddbd50c3778e9

See more details on using hashes here.

File details

Details for the file core_ftp-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: core_ftp-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for core_ftp-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0279960354c9f81778b431593bd7128c4d6c5e7ca6391bda93aa53cb004d9fc0
MD5 1beaaf8152247799a1669c93a722aa10
BLAKE2b-256 1e1ae4e7e077e6801c25519158ef37e28ff2100969d225147b1b381e02f3d3fb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page