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, KWallet (since version 5.97) 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.

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

Building the module

SecretStorage requires Python ≥ 3.10 and these packages to work:

To build SecretStorage, use this command:

python3 -m build

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

python3 -m sphinx docs build/sphinx/html

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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

secretstorage-3.4.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file secretstorage-3.4.0.tar.gz.

File metadata

  • Download URL: secretstorage-3.4.0.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for secretstorage-3.4.0.tar.gz
Algorithm Hash digest
SHA256 c46e216d6815aff8a8a18706a2fbfd8d53fcbb0dce99301881687a1b0289ef7c
MD5 992f6068aac2117f8dee2fa83c033254
BLAKE2b-256 319f11ef35cf1027c1339552ea7bfe6aaa74a8516d8b5caf6e7d338daf54fd80

See more details on using hashes here.

Provenance

The following attestation bundles were made for secretstorage-3.4.0.tar.gz:

Publisher: main.yml on mitya57/secretstorage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file secretstorage-3.4.0-py3-none-any.whl.

File metadata

  • Download URL: secretstorage-3.4.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for secretstorage-3.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e3b6265c2c63509fb7415717607e4b2c9ab767b7f344a57473b779ca13bd02e
MD5 fccecaec27b89f6bfc285c31d6a1d67a
BLAKE2b-256 91ff2e2eed29e02c14a5cb6c57f09b2d5b40e65d6cc71f45b52e0be295ccbc2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for secretstorage-3.4.0-py3-none-any.whl:

Publisher: main.yml on mitya57/secretstorage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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