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.5.0.tar.gz (19.9 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.5.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for secretstorage-3.5.0.tar.gz
Algorithm Hash digest
SHA256 f04b8e4689cbce351744d5537bf6b1329c6fc68f91fa666f60a380edddcd11be
MD5 e9de49f6474fc3734fde4209e594e7d9
BLAKE2b-256 1c03e834bcd866f2f8a49a85eaff47340affa3bfa391ee9912a952a1faa68c7b

See more details on using hashes here.

Provenance

The following attestation bundles were made for secretstorage-3.5.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.5.0-py3-none-any.whl.

File metadata

  • Download URL: secretstorage-3.5.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 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.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ce65888c0725fcb2c5bc0fdb8e5438eece02c523557ea40ce0703c266248137
MD5 3c0ece2eb3aa489d8aab0b01c8e81b01
BLAKE2b-256 b746f5af3402b579fd5e11573ce652019a67074317e18c1935cc0b4ba9b35552

See more details on using hashes here.

Provenance

The following attestation bundles were made for secretstorage-3.5.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