Skip to main content

Python bindings to FreeDesktop.org Secret Service API

Project description

Travis CI 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 (since version 2.30) and KSecretsService.

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.1.0.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

SecretStorage-3.1.0-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: SecretStorage-3.1.0.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/3.6.4

File hashes

Hashes for SecretStorage-3.1.0.tar.gz
Algorithm Hash digest
SHA256 29aa3cbd36dd5e54ac17d69161f9a150548f4ffba21fa8b5fdd5add854fe7d8b
MD5 a1b412b11e560e72b4b4b32eb4b9ad4a
BLAKE2b-256 177a683ce8d41b0b392199f1f6273a5cc81a0583b886e799786b7add5750817f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: SecretStorage-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/3.6.4

File hashes

Hashes for SecretStorage-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20196abd1a9d1310df7573d58ca6e7ed9292218c98ca3638eea07beb16080343
MD5 de0e1229b0bbcd0102e5769f6db0ad50
BLAKE2b-256 d8e880975fd281764c80b2eb581a7f25d2109786e273b8925e8161bd2d06d10a

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