sopsy
SOPS Python wrapper library
What it is and what it does
SOPSy is a Python wrapper around the SOPS command-line encryption tool, allowing you to programmatically encrypt, decrypt, and retrieve secrets from YAML and JSON files. It abstracts away direct CLI invocation, letting you work with encrypted files through a simple Python API—calling methods like `get()` to retrieve individual secrets or `decrypt()` to load all secrets at once.
The package requires the SOPS binary to be installed separately on your system. It depends only on pyyaml for parsing, making it lightweight. However, the repository is now archived and abandoned, meaning no new features or security updates are planned, though the last commit was recent (2025-07-26).
Use it for:
- Load encrypted secrets from a YAML or JSON file in a Python application at runtime without exposing plaintext.
- Retrieve a single secret value by key from an encrypted file for use in configuration or authentication.
- Encrypt plaintext configuration files programmatically using SOPS encryption rules defined in a `.sops.yml` file.
- Integrate SOPS-encrypted secrets into a Python deployment or CI/CD pipeline that needs to manage multiple environments.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
SOPSy wraps the SOPS command-line tool to encrypt, decrypt, and manage secrets in YAML and JSON files from Python code.
Yes, if you are already using SOPS for secret management and need Python integration. The low install friction and permissive license make it straightforward to add. However, be aware that the repository is archived and abandoned—use it only if you are comfortable maintaining it yourself or if your SOPS version and Python environment are stable enough not to require upstream fixes.
Install
sopsy on PyPI
pip
pip install sopsyuv
uv add sopsypoetry
poetry add sopsyInstalling sopsy
Before you install
Low install friction; pure Python wheel with a single runtime dependency (pyyaml). However, the repository is archived and marked abandoned as of the latest release on 2025-07-26, which signals no active maintenance going forward.
License in practice
MIT license is permissive; you can use, modify, and distribute SOPSy freely in commercial and private projects with minimal restrictions.
Quickstart
pip install sopsy
from sopsy import Sops
sops = Sops("secrets.yml")
my_secret = sops.get("my_secret_key")
all_secrets = sops.decrypt()
The SOPS binary must be installed and available in your $PATH before SOPSy can function (e.g., via brew install sops or your system package manager).
Verify before relying
- Whether the archived repository will receive security patches or bug fixes in the future.
- Compatibility of SOPSy with future versions of SOPS or Python beyond 3.8.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pyyaml |
| Maintenance | abandoned — 384 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 223,832/month — #9,239 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sopsy-1.2.1-py3-none-any.whl
Keywords: sops
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
cryptoProvides command-line tools to encrypt and…
permissive · top 5,000 on PyPI
aws-encryption-sdk-cliCommand-line tool to encrypt and decrypt files…
permissive · top 15,000 on PyPI
eciespyEncrypts and decrypts data using Elliptic Curve…
permissive · top 15,000 on PyPI
kasa-cryptProvides fast encryption and decryption…
permissive · top 15,000 on PyPI
PGPyPGPy implements OpenPGP (RFC 4880) in pure…
permissive · top 5,000 on PyPI
gnupgA Python wrapper around GnuPG that lets you…
copyleft · top 5,000 on PyPI
aws-encryption-sdkEncrypts and decrypts data using AWS KMS keys…
permissive · top 5,000 on PyPI
onepasswordWrapper around the 1Password CLI that lets you…
permissive · top 15,000 on PyPI
pyAesCryptEncrypts and decrypts files and binary streams…
permissive · top 15,000 on PyPI
http-eceImplements encrypted content encoding for HTTP…
permissive · top 5,000 on PyPI