A Python package for FTP file management.
Project description
FTP Manager Python Package
The FTP Manager Python package simplifies managing files on FTP servers. It provides easy-to-use functions for listing folders, uploading files, downloading files, and creating new folders on the FTP server. Whether you're handling large datasets or a few files, this package streamlines FTP file management tasks.
Installation
You can install the FTP Manager package via pip:
pip install FTP_manager
Usage
Here's how you can use the FTP Manager package in your Python projects:
from FTP_manager import FTPManager
# Initialize FTPManager with host, username, and password
host = 'ftp.example.com'
username = 'your_username'
password = 'your_password'
ftp_manager = FTPManager(host, username, password)
# List top-level folders on the FTP server
top_level_folders = ftp_manager.list_top_level_folders()
print("Top Level Folders:", top_level_folders)
# Upload a DataFrame as a CSV file to a remote folder
import pandas as pd
data = {'Column1': [1, 2, 3], 'Column2': ['A', 'B', 'C']}
df = pd.DataFrame(data)
remote_folder = 'data'
file_name = 'data_file'
ftp_manager.upload_file(df, remote_folder, file_name)
# Download a CSV file from the FTP server as a DataFrame
downloaded_data = ftp_manager.download_file(remote_folder, file_name)
print("Downloaded Data:")
print(downloaded_data)
# Create a new folder on the FTP server
new_folder_name = 'new_folder'
ftp_manager.create_folder(new_folder_name)
Features
List Folders: Easily list folders on the FTP server.
Upload Files: Upload Pandas DataFrames as CSV files to the FTP server.
Download Files: Download CSV files from the FTP server as Pandas DataFrames.
Create Folders: Create new folders on the FTP server.
Dependencies
The FTP Manager package requires the following dependencies:
' pandas '
License
This project is licensed under the MIT License - see the LICENSE file for details.
Issues and Contributions
For issues and feature requests, please open an issue in the GitHub repository. Contributions are welcome; you can create a pull request with your changes.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file FTP_manager-1.0.0.tar.gz.
File metadata
- Download URL: FTP_manager-1.0.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42a8c4d23b94fded4b6feb6ac3c6b5b4ac76b58c0d6048bac3d3835e3b7925cf
|
|
| MD5 |
708666c56416337c69bb82d5475750e6
|
|
| BLAKE2b-256 |
d217ec3276cc488a96d154a8dc2fb60dcad9b3429cf20c55c649bf1f927b5f4b
|
File details
Details for the file FTP_manager-1.0.0-py3-none-any.whl.
File metadata
- Download URL: FTP_manager-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebf5b1126074c0e0077c2354bca9322955d62c7c86492974ce3ed448b8cf9821
|
|
| MD5 |
86cbb9016e5ec880a41e974172037712
|
|
| BLAKE2b-256 |
fbe57d02554f256909e6c9abc9c0c58116aa3fdf2c0d3f816dcf01283a149b14
|