Skip to main content

Python SDK for AWS Secrets Manager.

Reason this release was yanked:

Project ownership transferred. This release represents the previous implementation and is not part of the official AWS SDK.

Project description

Getting Started

Installation

pip install aws-sdk-secrets-manager

Usage

from aws_sdk_secrets_manager import AsyncSecretsManagerClient


async def main():
    async with AsyncSecretsManagerClient() as s3:
        # Example: call the batch_get_secret_value operation
        response = await s3.batch_get_secret_value()
        print(response["secret_values"])

Error Handling

The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.

from aws_sdk_secrets_manager import AsyncSecretsManagerClient
from aws_sdk_secrets_manager.error import DecryptionFailure


async def main():
    async with AsyncSecretsManagerClient() as s3:
        try:
            await s3.batch_get_secret_value()
        except DecryptionFailure as e:
            print(f"Error: {e}")
            print(e.data)  # additional error data

Retrying

The SDK retries failed operations automatically. Retry behaviour follows the Smithy specification: errors are retried based on their is_retryable and is_throttling_error attributes. Throttling errors use a longer base delay. Network-level failures (connection errors and timeouts) are also retried. Non-retryable errors, such as client errors without the @retryable trait, are raised immediately without further attempts.

The number of attempts defaults to 3 and can be changed at the client level via retry_max_attempts, or per call via config_overrides.

from aws_sdk_secrets_manager import AsyncSecretsManagerClient


async def main():
    async with AsyncSecretsManagerClient() as s3:
        # Default: 3 attempts for every operation
        response = await s3.batch_get_secret_value()

        # Override per operation
        response = await s3.batch_get_secret_value(config_overrides={"retry_max_attempts": 5})

        # Disable retries for this call
        response = await s3.batch_get_secret_value(config_overrides={"retry_max_attempts": 1})

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

aws_sdk_secrets_manager-0.2.0.tar.gz (111.8 kB view details)

Uploaded Source

Built Distribution

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

aws_sdk_secrets_manager-0.2.0-py3-none-any.whl (217.0 kB view details)

Uploaded Python 3

File details

Details for the file aws_sdk_secrets_manager-0.2.0.tar.gz.

File metadata

  • Download URL: aws_sdk_secrets_manager-0.2.0.tar.gz
  • Upload date:
  • Size: 111.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aws_sdk_secrets_manager-0.2.0.tar.gz
Algorithm Hash digest
SHA256 567d755c25b7eb4f3007da520cad2d2ce413ffd815d270a2b303bd635ab90125
MD5 5458d0bcea5554a3bb26cbb9e27633e8
BLAKE2b-256 94835dad79b803c2d82fb39ae51bb060209a06c318484102d791150db50a3acc

See more details on using hashes here.

Provenance

The following attestation bundles were made for aws_sdk_secrets_manager-0.2.0.tar.gz:

Publisher: publish.yml on kap-sh/aws-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aws_sdk_secrets_manager-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aws_sdk_secrets_manager-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 373b64fa27d46801bfaf9cc75197fc3b0fbcf65a79fb1552b5016b0babb305ad
MD5 0d22ec8e1e58a4baf89736d24c2af0f8
BLAKE2b-256 4440ca8f7f6be8207f3b2009c2d30aae7c1981411751b15ae28fd6b7e73541be

See more details on using hashes here.

Provenance

The following attestation bundles were made for aws_sdk_secrets_manager-0.2.0-py3-none-any.whl:

Publisher: publish.yml on kap-sh/aws-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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