👩 This project is part of the passbolt "lab"!
⚗️ It is used to illustrate an article or as a conversation starter.
🧪 Use at your own risks!
(c) 2021 Passbolt SA
Passbolt is registered trademark of Passbolt S.A.
MIT No Attribution - https://opensource.org/licenses/MIT-0
Python library for Passbolt API based on httpx and PGPy.
You can also use python-gnupg if needed but it is not the default.
python -m pip install py-passbolt
Basically, create a config.json
file containing needed configuration. You will find samples:
- For PGPy (default): config.json.PGPy.sample
- For python-gnupg: config.json.gnupg.sample
Then have a look at https://gitlab.com/AnatomicJC/py-passbolt/-/blob/main/example.py python script.
Mandatory:
- PASSBOLT_BASE_URL: Your passbolt URL
For PGPy:
- PASSBOLT_PRIVATE_KEY: Your passbolt private key in one-line format (See below about how to format)
- PASSBOLT_PASSPHRASE: Your passbolt passphrase
For python-gnupg:
- PASSBOLT_GPG_BINARY (Optional): path to your gpg binary, default to "gpg"
- PASSBOLT_GPG_LIBRARY: Set this to gnupg, otherwise it will be the default "PGPy"
- PASSBOLT_FINGERPRINT: The OpenPGP key fingerprint to use
sed -z 's/\n/\\n/g' private.asc
Install gnu-sed
with brew:
$ brew install gnu-sed
Use gsed instead of sed:
gsed -z 's/\n/\\n/g' private.asc