Registry / auth-security / decorative-secrets

decorative-secrets

JSON →
library0.12.14pypypiunverified

A library providing decorators for multi-source secret retrieval, allowing secrets to be fetched from environment variables, files, AWS Secrets Manager, and other backends. Current version is 0.12.14. Release cadence is irregular with frequent minor version bumps.

auth-securitydevopsaws
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

from decorative_secrets import secret

Retrieve a secret from an environment variable using the @secret decorator.

import os os.environ['MY_SECRET_KEY'] = 'my-secret-value' from decorative_secrets import secret @secret('MY_SECRET_KEY') def get_secret(val): return val print(get_secret())
Debug
Known footguns
gotchaThe 'secret' decorator returns the secret value as the first argument to the decorated function. If you don't expect an argument, your function will receive an extra argument.
deprecatedThe 'from_env' backend (used with `@secret('KEY', from_env=True)`) is deprecated in favor of the default behavior where environment variable keys are automatically detected.
gotchaUsing a period (.) in the key name may be misinterpreted as nesting. For example, 'my.secret' might be parsed as a path instead of a literal key.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
13 hits · last 30 days
claudebot
4
gptbot
3
ahrefsbot
3
Resources