Skip to main content

Python bindings to FreeDesktop.org Secret Service API

Project description

GitHub Actions status Coverage status ReadTheDocs status

Module description

This module provides a way for securely storing passwords and other secrets.

It uses D-Bus Secret Service API that is supported by GNOME Keyring, KSecretsService and KeePassXC.

The main classes provided are secretstorage.Item, representing a secret item (that has a label, a secret and some attributes) and secretstorage.Collection, a place items are stored in.

SecretStorage supports most of the functions provided by Secret Service, including creating and deleting items and collections, editing items, locking and unlocking collections (asynchronous unlocking is also supported).

The documentation can be found on secretstorage.readthedocs.io.

Building the module

SecretStorage requires these packages to work:

To build SecretStorage, use this command:

python3 setup.py build

If you have Sphinx installed, you can also build the documentation:

python3 setup.py build_sphinx

Testing the module

First, make sure that you have the Secret Service daemon installed. The GNOME Keyring is the reference server-side implementation for the Secret Service specification.

Then, start the daemon and unlock the default collection, if needed. The testsuite will fail to run if the default collection exists and is locked. If it does not exist, the testsuite can also use the temporary session collection, as provided by the GNOME Keyring.

Then, run the Python unittest module:

python3 -m unittest discover -s tests

If you want to run the tests in an isolated or headless environment, run this command in a D-Bus session:

dbus-run-session -- python3 -m unittest discover -s tests

Get the code

SecretStorage is available under BSD license. The source code can be found on GitHub.

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

SecretStorage-3.3.1.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

SecretStorage-3.3.1-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file SecretStorage-3.3.1.tar.gz.

File metadata

  • Download URL: SecretStorage-3.3.1.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1+

File hashes

Hashes for SecretStorage-3.3.1.tar.gz
Algorithm Hash digest
SHA256 fd666c51a6bf200643495a04abb261f83229dcb6fd8472ec393df7ffc8b6f195
MD5 23563c1d167c51e3d9483479cd7caccd
BLAKE2b-256 cd08758aeb98db87547484728ea08b0292721f1b05ff9005f59b040d6203c009

See more details on using hashes here.

File details

Details for the file SecretStorage-3.3.1-py3-none-any.whl.

File metadata

  • Download URL: SecretStorage-3.3.1-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1+

File hashes

Hashes for SecretStorage-3.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 422d82c36172d88d6a0ed5afdec956514b189ddbfb72fefab0c8a1cee4eaf71f
MD5 8fed37e08fe059887ec3ba9e9e37f54c
BLAKE2b-256 d91e29cd69fdac7391aa51510dfd42aa70b4e6a826c8cd019ee2a8ab9ec0777f

See more details on using hashes here.

Supported by

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