Skip to main content

Lightweight secure file transfer SDK for local, SFTP, Google Cloud Storage, and Amazon S3 workflows.

Project description

mft-lite

mft-lite is a lightweight secure file-transfer SDK and CLI for enterprise data movement. It supports local files, SFTP, Google Cloud Storage, and Amazon S3 with retries, streaming chunks, and SHA-256 checksums.

Install

pip install mft-lite
pip install "mft-lite[gcp]"   # Google Cloud Storage support
pip install "mft-lite[aws]"   # Amazon S3 support
pip install "mft-lite[all]"   # Both GCP and AWS

CLI examples

mft-lite transfer ./file.txt ./copy.txt
mft-lite transfer ./file.txt sftp://user@sftp.example.com:22/drop/file.txt
mft-lite transfer gs://source-bucket/file.txt sftp://user@sftp.example.com/drop/file.txt
mft-lite transfer s3://source-bucket/file.txt gs://target-bucket/file.txt

For SFTP authentication:

export MFT_LITE_SFTP_USERNAME=user
export MFT_LITE_SFTP_PASSWORD='secret'
# or
export MFT_LITE_SFTP_KEY_FILE=/path/to/private_key

Python API

from mft_lite import transfer

result = transfer(
    source="./file.txt",
    destination="./copy.txt",
    retries=3,
)
print(result.bytes_transferred, result.checksum_sha256)

Development

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest
ruff check src tests
python -m build
python -m twine check dist/*

Publish

python -m twine upload dist/*

Use __token__ as username and your PyPI API token as password.

Security note

SFTP uses system known-hosts validation and rejects unknown host keys by default. Add trusted host keys to ~/.ssh/known_hosts before production use.

License

MIT

Author: Raghava Chellu

MIT License is freely usable for academic, personal, and commercial projects.

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

mft_lite-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

mft_lite-0.1.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file mft_lite-0.1.0.tar.gz.

File metadata

  • Download URL: mft_lite-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for mft_lite-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1d14a6d4dab28384c17c43749ae887cab3488b733038df4ffb928f5831a1fa00
MD5 02e6509f51ad9459c01729686c9f6d8a
BLAKE2b-256 f02ceb2dc2648df7e07704a41c91eb0e6f31d559281d655ce415bd27aa73368b

See more details on using hashes here.

File details

Details for the file mft_lite-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mft_lite-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for mft_lite-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc394b6b028ba72c4f8558f1828e32e756ae672d448607b15120021dcb12aa9b
MD5 741d3de6edaa1967abf9561ff57d7758
BLAKE2b-256 560574ae98ae2d85836f0c7395e51b78693c7cfcad8e9e17e66cf6caca523dc8

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