skillfed

aws-secretsmanager-caching

Client-side AWS Secrets Manager caching library

aws-secretsmanager-caching v1.1.3 2.9M downloads/30d#2,820 on PyPI145
Permissive license Active released

What it is and what it does

This package provides a client-side caching layer for AWS Secrets Manager that stores retrieved secrets in memory, reducing repeated API calls to AWS. It wraps botocore to handle secret retrieval and caching logic, allowing applications to configure cache size, refresh intervals, and retry behavior for failed requests.

The library is designed for Python applications that need to access secrets frequently without incurring the latency and cost of repeated AWS API calls. It includes decorators to inject secrets directly into function arguments and supports both simple string secrets and JSON-based secret objects. Configuration options control cache size, refresh timing, and exception retry strategies.

Use it for:

  • Reduce API call volume in applications that access the same secrets multiple times during request handling.
  • Inject database credentials or API keys into function parameters using decorators without explicit secret retrieval code.
  • Configure automatic secret refresh intervals to balance freshness with API call reduction.
  • Handle transient AWS API failures with exponential backoff retry logic before surfacing errors to the application.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Caches AWS Secrets Manager secrets in-process to reduce API calls and improve application performance when retrieving secrets repeatedly.

Yes. The package is actively maintained, has no known vulnerabilities, minimal dependencies, and solves a real problem for AWS-based Python applications. The permissive Apache 2.0 license and stable production status make it a low-risk addition. Install if your application retrieves secrets from AWS Secrets Manager more than occasionally.

Install

aws-secretsmanager-caching on PyPI

pip

pip install aws-secretsmanager-caching

uv

uv add aws-secretsmanager-caching

poetry

poetry add aws-secretsmanager-caching

Installing aws-secretsmanager-caching

Before you install

Low install friction with a single runtime dependency (botocore). Actively maintained with recent commits and stable production status.

License in practice

Licensed under Apache 2.0, a permissive license allowing commercial and private use with minimal restrictions.

Quickstart

pip install aws-secretsmanager-caching

import botocore.session
from aws_secretsmanager_caching import SecretCache, SecretCacheConfig

client = botocore.session.get_session().create_client('secretsmanager')
cache = SecretCache(config=SecretCacheConfig(), client=client)
secret = cache.get_secret_string('mysecret')

Requires Python 3.7 or newer and an AWS account with access to AWS Secrets Manager.

Verify before relying

  • Whether the cache TTL and refresh interval defaults (3600 seconds) are suitable for typical secret rotation workflows.
  • Performance impact of the configurable max_cache_size (default 1024) on memory usage in high-secret scenarios.

Package facts

License not declared (permissive)
Python support supports the current Python release (>3.5)
Install friction low — pure-Python wheel
Runtime dependencies 1 — botocore
Maintenance actively maintained — 785 days since the last release
Last repo commit
First released
Downloads 2,928,556/month — #2,820 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: aws_secretsmanager_caching-1.1.3-py3-none-any.whl

Keywords: secretsmanager, secrets, manager, development, cache, caching, client

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7

Tags

AWS secrets manager cachingin-process secret cachingreduce secrets manager API callsPython secrets caching clientAWS credential cachingsecret refresh and cachebotocore secrets caching
aws-integrationcredential-managementcaching

More Security packages

SecretStorage

Provides Python bindings to the FreeDesktop.org…

permissive · top 1,000 on PyPI

msal

MSAL for Python handles OAuth2 and OpenID…

permissive · top 1,000 on PyPI

joserfc

joserfc implements JOSE standards (JWS, JWE,…

permissive · top 1,000 on PyPI

Authlib

Authlib provides a complete implementation of…

permissive · top 1,000 on PyPI

argon2-cffi-bindings

Provides low-level CFFI bindings to the…

permissive · top 1,000 on PyPI

adal

ADAL for Python authenticates applications with…

permissive · top 1,000 on PyPI

aws-cdk.aws-secretsmanager

AWS CDK construct library for provisioning and…

permissive · top 15,000 on PyPI

ibm-secrets-manager-sdk

A Python client library for programmatically…

permissive · top 15,000 on PyPI

keeper-secrets-manager-core

Python SDK for Keeper Secrets Manager that…

permissive · top 15,000 on PyPI

cerberus-python-client

A Python client library for reading and writing…

permissive · top 5,000 on PyPI

credstash

CredStash stores and retrieves secrets using…

permissive · top 15,000 on PyPI

infisicalsdk

Fetch and manage secrets from Infisical, an…

unclear · top 5,000 on PyPI

azure-keyvault-secrets

Securely store, retrieve, and manage secrets…

permissive · top 1,000 on PyPI

mypy-boto3-secretsmanager

Provides type annotations and IDE autocomplete…

permissive · top 5,000 on PyPI

ssm-parameter-store

Wrapper for AWS Systems Manager Parameter Store…

permissive · top 15,000 on PyPI

cachier

Cachier is a decorator that adds persistent,…

permissive · top 15,000 on PyPI