Skip to main content

Windows Credential Manager backend for keyring

Project description

keyring_wincred

Windows Credential Manager backend for keyring for WSL.

This package allows Python applications running in WSL (Windows Subsystem for Linux) to store secrets in the Windows Credential Manager.

Installation

git clone https://github.com/ilpianista/keyring_wincred.git
cd keyring_wincred
pip install .

Usage

Once installed, keyring should automatically detect and use this backend when running under WSL. To force it configure ~/.config/python_keyring/keyringrc.cfg like so:

[backend]
default-keyring = keyring_wincred.WinCredKeyring

Instead, in Python:

import keyring

# Store a password
keyring.set_password("myservice", "myuser", "secret123")

# Retrieve a password
password = keyring.get_password("myservice", "myuser")

# Delete a password
keyring.delete_password("myservice", "myuser")

You can also use the keyring CLI:

keyring set myservice myuser
keyring get myservice myuser
keyring del myservice myuser

How it works

This backend uses PowerShell with inline C# code to call the Windows Credential Manager API (advapi32.dll). No external PowerShell modules are required.

Credentials are stored with target names in the format service:username.

Requirements

  • WSL (Windows Subsystem for Linux)
  • Python 3.8+
  • keyring package

License

MIT

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

keyring_wincred-0.1.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

keyring_wincred-0.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file keyring_wincred-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for keyring_wincred-0.1.0.tar.gz
Algorithm Hash digest
SHA256 55eaf70831eecf81df15a1f21ee6112949b7027cea6c1287fc620ad1aa308bd4
MD5 400b6e463f21239c9fe3446b7d1e5584
BLAKE2b-256 d6cef4d3c9597dc1ea6310c2dc4eedd4337b5990183b4f9dfac2f6ad90aec399

See more details on using hashes here.

Provenance

The following attestation bundles were made for keyring_wincred-0.1.0.tar.gz:

Publisher: workflow.yml on ilpianista/keyring_wincred

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

File details

Details for the file keyring_wincred-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for keyring_wincred-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 50673f8d64183e0abda910a0a87df78f8ce7687898cd07cfe1997349e572c8a0
MD5 46b51f29bf5b41131f2c3908a3b85de3
BLAKE2b-256 26f55c938324533040c61cf4b3bbb94a91d61b244e2a9976af201e987d432f9d

See more details on using hashes here.

Provenance

The following attestation bundles were made for keyring_wincred-0.1.0-py3-none-any.whl:

Publisher: workflow.yml on ilpianista/keyring_wincred

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