core-ftp#
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…
Documentation Contents#
Index:
Features#
SFTP Client
Simplified SFTP connection management with context manager support
Multiple authentication methods:
Password-based authentication
SSH private key authentication with optional passphrase
Customizable transport and connection parameters
Comprehensive file operations:
List files and directories with detailed attributes
Upload files from local filesystem or file-like objects
Download files to local filesystem
Delete files and directories
Change and retrieve current working directory
Built-in error handling with custom exceptions
Automatic resource cleanup
ETL Support
Abstract base class for SFTP-based ETL tasks
Seamless integration with core-etl framework
File filtering capabilities:
Filter by file extension
Filter by filename prefix
Time-based filtering with delay options
Optional automatic file cleanup after successful processing
Installation#
Install from PyPI using pip:
pip install core-ftp
uv pip install core-ftp # Or using UV...
pip install -e ".[dev]" # For development...
Setting Up Environment#
Install required libraries:
pip install --upgrade pip
pip install virtualenv
Create Python virtual environment:
virtualenv --python=python3.12 .venv
Activate the virtual environment:
source .venv/bin/activate
Install packages#
pip install .
pip install -e ".[dev]"
Check tests and coverage#
python manager.py run-tests
python manager.py run-coverage
Contributing#
Contributions are welcome! Please:
Fork the repository
Create a feature branch
Write tests for new functionality
Ensure all tests pass:
python manager.py run-testsRun linting:
pylint core_ftpRun security checks:
bandit -r core_ftpSubmit a pull request
License#
This project is licensed under the MIT License. See the LICENSE file for details.
Links#
Documentation: https://core-ftp.readthedocs.io/en/latest/
Repository: bytecode-solutions/core/core-ftp
Changelog: bytecode-solutions/core/core-ftp/-/blob/master/CHANGELOG.md
Support#
For questions or support, please open an issue on GitLab or contact the maintainers.