{"library":"localstack-client","title":"LocalStack Python Client","description":"The localstack-client is a lightweight Python client designed to facilitate interaction with LocalStack, a cloud service emulator. It provides a thin wrapper around the popular boto3 library, automatically configuring endpoint URLs to point to your local LocalStack instance. The library is actively maintained with frequent releases; version 2.11 was released in January 2026.","language":"python","status":"active","last_verified":"Fri May 15","install":{"commands":["pip install localstack-client"],"cli":null},"imports":["from localstack_client.session import Session"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import os\nfrom localstack_client.session import Session\n\n# Ensure LocalStack is running before executing this code.\n# If running LocalStack in Docker, make sure port 4566 is mapped.\n\n# You can optionally set AWS_ENDPOINT_URL, but localstack-client defaults to localhost:4566\n# os.environ['AWS_ENDPOINT_URL'] = 'http://localhost:4566'\n\nsession = Session()\ns3_client = session.client('s3')\n\ntry:\n    # Create a bucket (ensure it doesn't already exist)\n    bucket_name = 'my-local-bucket-123'\n    s3_client.create_bucket(Bucket=bucket_name)\n    print(f\"Bucket '{bucket_name}' created successfully.\")\n\n    # List buckets to verify\n    response = s3_client.list_buckets()\n    print(\"\\nExisting buckets:\")\n    for bucket in response['Buckets']:\n        print(f\"- {bucket['Name']}\")\n\n    # Upload a file\n    file_content = b'Hello from LocalStack!'\n    file_name = 'hello.txt'\n    s3_client.put_object(Bucket=bucket_name, Key=file_name, Body=file_content)\n    print(f\"\\nFile '{file_name}' uploaded to '{bucket_name}'.\")\n\n    # Download the file\n    download_response = s3_client.get_object(Bucket=bucket_name, Key=file_name)\n    downloaded_content = download_response['Body'].read().decode('utf-8')\n    print(f\"\\nDownloaded content: '{downloaded_content}'\")\n\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")\n","lang":"python","description":"This quickstart demonstrates how to initialize a session with localstack-client and interact with a local S3 service. It creates a bucket, uploads a file, lists buckets, and downloads the file, all against a running LocalStack instance. Remember that a LocalStack instance must be running and accessible before executing this code.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-15","installed_version":"2.11","pypi_latest":"2.11","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":4.6,"avg_import_s":0.7,"wheel_type":"sdist"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"localstack-client","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.64,"mem_mb":14.2,"disk_size":"52.1M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"localstack-client","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"clean","install_time_s":4.4,"import_time_s":0.48,"mem_mb":14.2,"disk_size":"53M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"localstack-client","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.86,"mem_mb":17.1,"disk_size":"55.6M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"localstack-client","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"clean","install_time_s":4.1,"import_time_s":0.78,"mem_mb":17,"disk_size":"56M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"localstack-client","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.78,"mem_mb":16,"disk_size":"45.3M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"localstack-client","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"clean","install_time_s":4.7,"import_time_s":0.81,"mem_mb":16,"disk_size":"46M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"localstack-client","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.77,"mem_mb":17,"disk_size":"45.0M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"localstack-client","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"clean","install_time_s":4.2,"import_time_s":0.75,"mem_mb":17,"disk_size":"45M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"localstack-client","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.58,"mem_mb":13.4,"disk_size":"51.5M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"localstack-client","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"clean","install_time_s":5.4,"import_time_s":0.52,"mem_mb":13.4,"disk_size":"52M"}]}}