Provider package for Apache Airflow that enables FTP file transfer protocol operations including hooks, operators, and sensors for workflow integration.
84
A utility for managing remote FTP directory structures and retrieving metadata.
Build a Python module that provides functionality for managing directories on an FTP server. The module should handle listing directory contents, retrieving detailed metadata, and managing directory structures.
/data/uploads directory on the FTP server @test/empty_dir @test/reports directory @test/archive/2024 on the remote FTP server @test/temp/old_logs from the remote FTP server @test@generates
from typing import List, Dict, Any
class FTPDirectoryManager:
"""Manager for FTP directory operations."""
def __init__(self, ftp_conn_id: str):
"""
Initialize the FTP directory manager.
Args:
ftp_conn_id: Airflow connection ID for FTP server
"""
pass
def list_directory(self, path: str) -> List[str]:
"""
List all files and subdirectories in the specified remote directory.
Args:
path: Remote directory path
Returns:
List of filenames and directory names
"""
pass
def describe_directory(self, path: str) -> Dict[str, Dict[str, Any]]:
"""
Retrieve detailed metadata for all entries in the specified directory.
Args:
path: Remote directory path
Returns:
Dictionary mapping filenames to their metadata attributes
"""
pass
def create_directory(self, path: str) -> None:
"""
Create a new directory on the remote FTP server.
Args:
path: Remote directory path to create
"""
pass
def delete_directory(self, path: str) -> None:
"""
Delete a directory from the remote FTP server.
Args:
path: Remote directory path to delete
Raises:
Exception: If directory does not exist or cannot be deleted
"""
passProvides FTP operations support for Apache Airflow including hooks for FTP server interaction.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/pypi-apache-airflow-providers-ftpevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10