Skip to main content

kdewallet interface

Project description

This is a simple project that wraps the kwallet-query command. It was made to be flexible you can use whichever syntax suites your fancy the way that kde structures their password storage is wallet name -> folder name -> entry name

you can install this package via PyPI

pip install kdewallet

this module can be used in 3 ways here's a quick overview

from kdewallet import KDEWallet
my_pw = KDEWallet.wallet.folder.entry
my_pw = KDEWallet[wallet][folder][entry]
# or mix n match
my_pw = KDEWallt[wallet].folder.[entry]


# these are the more procedural style options
my_pw = KDEWallet(wallet, folder).get_entry(entry)
my_pw = KDEWallet(wallet).get_entry(entry, folder=folder)

# setting is supported as well
KDEWallet.wallet.folder.entry = 'really secure'

For a more detailed example we'll assume we have two wallets just like this.

work       # wallet 1
  servera  # folder 1
    root   # entry 1 in folder 1
    userx  # etnry 2 in folder 1

  serverb
    userz
    usery

personal  # wallet 2
  gmail   # folder 1 in wallet 2
    frank # entry 1  
    maddy

  banking     # etc
    evil bank
    meh credit union

so given that setup of data some examples of how you might use this would be as follows

from kdewallet import KDEWallet
my_wallet = KDEWallet(wallet='work')
my_pw = my_wallet.get_entry(entry='root', folder='servera')
function_that_needs_password(my_pw)
other_pw = my_wallet.get_entry('frank', 'gmail', 'personal')
function_that_needs_password(other_pw)

This could use a bit more work still, but the core tests are passing most functionality seems to be working well enough for now. Not sure why I went mad with the alternate syntax styles but ya gotta have fun sometimes I guess.

Currently my todos for this project are:

  • find if there is a more secure way to pass pw to kwallet-query than printf
  • add defult wallet/folder support to object access
  • make it clearer whats happening with properties
  • write more rigorous tests

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

kdewallet-1.0.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

kdewallet-1.0.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file kdewallet-1.0.1.tar.gz.

File metadata

  • Download URL: kdewallet-1.0.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

File hashes

Hashes for kdewallet-1.0.1.tar.gz
Algorithm Hash digest
SHA256 28f20ada2105038b2beca12d1f015f3effa4c32968898cf2d0deac2942060879
MD5 605689bca23b53d4fdf11a3d047880e6
BLAKE2b-256 700d94ec88e63d96e98f02266732438a121d98761c1d3e66eb2286e5f85de827

See more details on using hashes here.

File details

Details for the file kdewallet-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: kdewallet-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

File hashes

Hashes for kdewallet-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3b6b2f3734f93fab94d8bbedf525568ad5e13447e50269b9ddf31a268beb8d4e
MD5 e69ae771c55abe314af7886d8d58cd44
BLAKE2b-256 363b481fcb66e514b17b120823f8730fd2495c57db28db7038fdc37c0a46cc3d

See more details on using hashes here.

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