Johnnycanencrypt aka jce is a Python module written in Rust to do basic encryption and decryption operations. It uses amazing sequoia-pgp library for the actual OpenPGP operations.
NOTE -- This is very much experimental code at the current state, please do not use it in production.
sudo dnf install nettle clang clang-devel nettle-dev
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install requirements-dev.txt
maturin develop
>>> import johnnycanencrypt as jce
>>> j = jce.Johnny("public.asc")
>>> data = j.encrypt_bytes(b"kushal \xf0\x9f\x90\x8d")
>>> js = jce.Johnny("secret.asc")
>>> result = js.decrypt_bytes(data, "mysecretpassword")
>>> print(result.decode("utf-8"))
kushal ๐
Please go through the full API documentation for detailed descriptions.