SOPSy
SOPSy is a simple Python wrapper around SOPS.
Installation
SOPS binary must be installed and available in your $PATH:
# use your package manager to install it
brew install sops
Install the SOPSy library:
pip install sopsy
# or with whatever your package/project manager is
uv add sopsy
Quickstart
Retrieve a secret value:
from sopsy import Sops
sops = Sops("secrets.yml")
my_secret_key = sops.get("my_secret_key")
print(f"single secret: {my_secret_key}")
secrets = sops.decrypt()
print(f"all my secrets: {secrets}")
Encrypt a file:
import json
from pathlib import Path
from sopsy import Sops
plaintext_content = json.dumps({"hello": "world"})
Path("secrets.json").write_text(plaintext_content)
s = Sops("secrets.json", in_place=True)
# you either need a `.sops.yml` configuration file with `creation_rules` set
# or append some arguments to the `Sops.global_args` attribute:
# s.global_args.extend([
# "--age", "age1yt3tfqlfrwdwx0z0ynwplcr6qxcxfaqycuprpmy89nr83ltx74tqdpszlw"
# ])
s.encrypt()
API Reference
Check documentation.
Metadata
Release files for sopsy 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sopsy-1.3.0.tar.gz | 6.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sopsy-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.9 kB
Release files / sopsy-1.3.0.tar.gz
| Download URL | sopsy-1.3.0.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9bcf8e2d7b2315c4cb441917c517bf6910356c18671ec9b70636c77b5ebc49e1
|
|
BLAKE2b-256 checksum How to use checksums |
d17364c2f3a3904659d971f09cea5b96aa990ac8d8adcb3f3a4a55861adb0a55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / sopsy-1.3.0-py3-none-any.whl
| Download URL | sopsy-1.3.0-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d509ba3c148042e5d9357f7f70749a09a622d38d00a576fddf112bedf513163
|
|
BLAKE2b-256 checksum How to use checksums |
9721ea8e00abcc8c2cfa44ec2dfda6bcbe0332eece3ca427f58e3b42d8ffaf92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for sopsy 1.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.