Skip to main content

Python library for Passbolt, an open-source manager for teams

Project description

pypassbolt-api

About

Python library for Passbolt API based on httpx and PGPy.

You can also use python-gnupg if needed but it is not the default.

How to install

python -m pip install pypassbolt-api

How to use

config.json configuration file

Basically, create a config.json file containing needed configuration. You will find samples:

Then have a look at https://gitlab.com/AnatomicJC/py-passbolt/-/blob/main/example.py python script.

Environment variables

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

How to set OpenPGP key in config.json or environment variables

Linux:

sed -z 's/\n/\\n/g' passbolt_private.txt

MacOS

Install gnu-sed with brew:

brew install gnu-sed

Use gsed instead of sed:

gsed -z 's/\n/\\n/g' passbolt_private.txt

Note: Almost all the source code has been obtained from the existing py-passbolt library, with some extra functions. py-passbolt

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypassbolt_api-0.0.4.tar.gz (8.6 kB view hashes)

Uploaded Source

Built Distribution

pypassbolt_api-0.0.4-py2.py3-none-any.whl (5.3 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page