IoT FTPS Client Library for Python
Project description
iot-ftps-client
This package is a wrapper around the ftplib protocol to provide a synchronous client for interacting with FTPS servers from IoT edge devices.
Table of Contents
Versioning
This repository adheres to Semantic Versioning. It will be maintained through the CHANGELOG.md and in GitHub Releases. It's important to note that you must maintain the version with your releases in iot/ftps/client/_version.py, otherwise a new package version will fail to get published.
Getting Started
This section provides basic examples with the iot-ftps-client.
Prerequisites
- Python 3.7 or later is required to use this package.
Basic Examples
-
Install via pip:
pip install iot-ftps-client
-
Import and say hello:
from iot.ftps.client import __version__ print(f"hello world from iot-ftps-client version: {__version__}")
-
Basic usage:
import tempfile from iot.ftps.client import IoTFTPSClient # instantiate client ftps_client = IoTFTPSClient( ftps_host="myServerIP", ftps_port=990, ftps_user="myServerUsername", ftps_pass="myServerPass***", ssl_implicit=True, ) # print info w/ repr print(f"{ftps_client.__repr__()}") # download blob to tempfile temp_file = tempfile.NamedTemporaryFile() download_result = ftps_client.download_file( source="path/to/blob.txt", dest=temp_file.name, ) if not download_result: print("unable to download file") temp_file.close() raise # upload tempfile to blob upload_result = ftps_client.upload_file( source=temp_file.name, dest="path/to/new/blob.txt", ) if not upload_result: print("unable to upload file") temp_file.close() raise # clean-up local memory temp_file.close()
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
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 iot-ftps-client-1.0.0.tar.gz.
File metadata
- Download URL: iot-ftps-client-1.0.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7375beb2c56f43f4f0065d58510973a7ca7243b714f6c0d179e0735f6a2c82c
|
|
| MD5 |
5696373f932d67d5d131f3bed9701d04
|
|
| BLAKE2b-256 |
22ca1edb7a896d5f8ace161d86a1ef0e30e9b568e863663ea980e1a6c961c9ed
|
File details
Details for the file iot_ftps_client-1.0.0-py3-none-any.whl.
File metadata
- Download URL: iot_ftps_client-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e9975eb87e7b8e063a8a73d129b45887590949881c6a5fa47a81decaa526363
|
|
| MD5 |
349f115ee3f661aee7f34b99f722af27
|
|
| BLAKE2b-256 |
2e91b8bf4a6c018eec9850aa6122a75c9f04732dc758648592240a6b2d301f06
|