Skip to main content

Project Description

#FTPS3 Spark does not have a connector to connect to FTP as it is not HDFS. So to move a file from FTP to S3, we need to download the file from FTP to local system and then upload it to S3. There is no library in market through which we can migrate a file from FTP to S3 directly. FTPS3 library helps you to mitigate it.

The FTPtoS3 class has needs to be invoked by passing the ftp and s3 client connection objects. After creating the object we can use uploadS3 method to upload the file to S3.

Installation

Installation is recommended via pip for Python 3.

pip install FTPtoS3

The package can then be imported using:

import FTPS3

Usage

Access the modules using the following statements.

from FTPS3.FTPtoS3 import *

Example

ftp_client = ftplib.FTP()
ftp_client.connect("<hostname>", <port>)
ftp_client.login("<username>", "<passowrd>")
s3_client = boto3.client(
    service_name='s3',
    region_name='<region>')
obj = FTPtoS3(ftp_client, s3_client)
obj.uploadS3("<ftp_path where file is present>",
             "<s3_path to be uploaded>",
             "<file_name in FTP>", "<s3 bucket name>")

Dependencies

FTPS3 has the following dependencies:

License

MIT License
© 2022 FTPS3

Release files for FTPtoS3 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for FTPtoS3 0.1.2
File Interpreter ABI Platform
FTPtoS3-0.1.2-py2.py3-none-any.whl Python 3, Python 2 none any Details

Release files / FTPtoS3-0.1.2-py2.py3-none-any.whl

Download URL FTPtoS3-0.1.2-py2.py3-none-any.whl
Size 4.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
b80ea25df144d07b3114d88fe61f70989909398c1ce0118e1457f1ea5b11c3b4
BLAKE2b-256 checksum
How to use checksums
a7edfae3030aa56f901846ab6cb9b83d197831feae1aebffb99406f97c6be5d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.1.2 This release

1 release file

0.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page