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.1.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.4.1-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: secretstorage-3.4.1.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.4.1.tar.gz
Algorithm Hash digest
SHA256 a799acf5be9fb93db609ebaa4ab6e8f1f3ed5ae640e0fa732bfea59e9c3b50e8
MD5 4e47872e4760235ed25fd6882d97182e
BLAKE2b-256 328aed6747b1cc723c81f526d4c12c1b1d43d07190e1e8258dbf934392fc850e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: secretstorage-3.4.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c55d57b4da3de568d8c3af89dad244ab24c35ca1da8625fc1b550edf005ebc41
MD5 4038b7b00759a499ab8bcabf3bb62f84
BLAKE2b-256 b06d24ebb101484f1911a6be6695b76ce43219caa110ebbe07d8c3a5f3106cca

See more details on using hashes here.

Provenance

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