skillfed

sopsy

SOPS Python wrapper library

sopsy v1.2.1 223.8K downloads/30d#9,239 on PyPI28
Permissive license MIT Abandoned released

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 sopsy

uv

uv add sopsy

poetry

poetry add sopsy

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: Security :: CryptographyTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

sops python wrapperencrypt decrypt secrets pythonyaml json secret managementsops cli integrationsecret file encryption
secrets-managementencryption-wrappersops-integration

More Python Modules packages