getsops/sops

Is it possible to encrypt text strings in Python using sops?

AndreyRojasD opened this issue · 2 comments

For instance, my use case is as follows.

import sops

def encrypt(password):
    return sops.encrypt(password)

The Python version of sops is deprecated and no longer supported. For version 2.0.0 sops was rewritten in go. If you want to encrypt something with sops from Python, use https://docs.python.org/3/library/subprocess.html to call the sops binary.

I agree with @felixfontein and have implemented it in a program to verify it works as expected with the new Go based sops package.
Using Python 3.12 and SOPS v3.8.1