{"library":"s5cmd","title":"s5cmd Python Distributions","description":"This project provides Python wheels for the high-performance `s5cmd` command-line tool, a utility written in Go for managing S3 and S3-compatible object storage systems. It focuses on speed and efficiency for bulk operations, parallel processing, and advanced filtering. The Python package ensures the `s5cmd` executable is available in the user's PATH after installation, allowing Python applications to invoke the CLI tool via subprocess. The current version is 0.3.3, with a release cadence tied to updates of the underlying `s5cmd` binary and build infrastructure improvements.","language":"python","status":"active","last_verified":"Sat May 16","install":{"commands":["pip install s5cmd"],"cli":{"name":"s5cmd","version":"Incorrect Usage: flag provided but not defined: -version"}},"imports":["import subprocess"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import subprocess\nimport os\n\n# Ensure AWS credentials are configured (e.g., via environment variables or ~/.aws/credentials)\n# For example, using environment variables for demonstration:\n# os.environ['AWS_ACCESS_KEY_ID'] = os.environ.get('AWS_ACCESS_KEY_ID', 'YOUR_AWS_ACCESS_KEY_ID')\n# os.environ['AWS_SECRET_ACCESS_KEY'] = os.environ.get('AWS_SECRET_ACCESS_KEY', 'YOUR_AWS_SECRET_ACCESS_KEY')\n# os.environ['AWS_REGION'] = os.environ.get('AWS_REGION', 'us-east-1')\n\ntry:\n    # Verify s5cmd is installed and accessible in PATH\n    version_output = subprocess.run(['s5cmd', 'version'], capture_output=True, text=True, check=True)\n    print(f\"s5cmd version:\\n{version_output.stdout}\")\n\n    # Example: List objects in an S3 bucket (replace with a real bucket)\n    bucket_name = \"your-test-s5cmd-bucket\"\n    list_command = ['s5cmd', 'ls', f's3://{bucket_name}/']\n    list_result = subprocess.run(list_command, capture_output=True, text=True, check=True)\n    print(f\"\\nListing objects in s3://{bucket_name}/:\\n{list_result.stdout}\")\n\n    # Example: Create a dummy local file and upload it\n    local_file_name = \"hello_s5cmd.txt\"\n    with open(local_file_name, \"w\") as f:\n        f.write(\"Hello from s5cmd Python distribution!\")\n    \n    upload_command = ['s5cmd', 'cp', local_file_name, f's3://{bucket_name}/{local_file_name}']\n    upload_result = subprocess.run(upload_command, capture_output=True, text=True, check=True)\n    print(f\"\\nUploaded {local_file_name}:\\n{upload_result.stdout}\")\n\n    # Example: Download the file back\n    download_command = ['s5cmd', 'cp', f's3://{bucket_name}/{local_file_name}', f'./downloaded_{local_file_name}']\n    download_result = subprocess.run(download_command, capture_output=True, text=True, check=True)\n    print(f\"\\nDownloaded 'downloaded_{local_file_name}':\\n{download_result.stdout}\")\n    \n    # Clean up local files\n    os.remove(local_file_name)\n    os.remove(f'./downloaded_{local_file_name}')\n\n    # Note: For production, consider robust error handling and command construction.\n    # Ensure the bucket 'your-test-s5cmd-bucket' exists and credentials have write access.\n\nexcept FileNotFoundError:\n    print(\"Error: 's5cmd' command not found. Ensure it's installed and in your system's PATH.\")\nexcept subprocess.CalledProcessError as e:\n    print(f\"Error executing s5cmd command: {e}\")\n    print(f\"Stdout: {e.stdout}\")\n    print(f\"Stderr: {e.stderr}\")\nexcept Exception as e:\n    print(f\"An unexpected error occurred: {e}\")\n","lang":"python","description":"This quickstart demonstrates how to check for `s5cmd` and execute basic S3 operations (list, upload, download) using Python's `subprocess` module. It assumes `s5cmd` is correctly installed via `pip install s5cmd` and that AWS credentials are configured in the environment or standard locations for `s5cmd` to access S3.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-16","installed_version":"0.3.3","pypi_latest":"0.3.3","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":1.7,"avg_import_s":0.01,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"s5cmd","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.01,"mem_mb":0.5,"disk_size":"34.7M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"s5cmd","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.7,"import_time_s":0.01,"mem_mb":0.5,"disk_size":"35M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"s5cmd","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.02,"mem_mb":1,"disk_size":"36.5M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"s5cmd","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.7,"import_time_s":0.02,"mem_mb":1,"disk_size":"37M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"s5cmd","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.02,"mem_mb":0.8,"disk_size":"28.4M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"s5cmd","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.5,"import_time_s":0.02,"mem_mb":0.8,"disk_size":"29M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"s5cmd","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.01,"mem_mb":1,"disk_size":"28.1M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"s5cmd","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.7,"import_time_s":0.01,"mem_mb":0.8,"disk_size":"29M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"s5cmd","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.01,"mem_mb":0.5,"disk_size":"34.2M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"s5cmd","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.9,"import_time_s":0.01,"mem_mb":0.5,"disk_size":"35M"}]}}