Welcome to keyrings.alt documentation!

class keyrings.alt.file.Encrypted

Bases: object

PyCrypto-backed Encryption support

block_size = 32
scheme = '[PBKDF2] AES256.CFB'
version = '1.0'
class keyrings.alt.file.EncryptedKeyring

Bases: keyrings.alt.file.Encrypted, keyrings.alt.file_base.Keyring

PyCrypto File Keyring

decrypt(password_encrypted, assoc=None)
encrypt(password, assoc=None)
filename = 'crypted_pass.cfg'
keyring_key

Much like the property builtin, but only implements __get__, making it a non-data property, and can be subsequently reset.

See http://users.rcn.com/python/download/Descriptor.htm for more information.

>>> class X(object):
...   @NonDataProperty
...   def foo(self):
...     return 3
>>> x = X()
>>> x.foo
3
>>> x.foo = 4
>>> x.foo
4
priority = 0.6
pw_prefix = b'pw:'
class keyrings.alt.file.PlaintextKeyring

Bases: keyrings.alt.file_base.Keyring

Simple File Keyring with no encryption

decrypt(password_encrypted, assoc=None)

Directly return encrypted password, ignore associated data.

encrypt(password, assoc=None)

Directly return the password itself, ignore associated data.

filename = 'keyring_pass.cfg'
priority = 0.5

Applicable for all platforms, but not recommended

scheme = 'no encyption'
version = '1.0'
class keyrings.alt.Gnome.Keyring

Bases: keyring.backend.KeyringBackend

Gnome Keyring

KEYRING_NAME = None

Name of the keyring in which to store the passwords. Use None for the default keyring.

delete_password(service, username)

Delete the password for the username of the service.

get_password(service, username)

Get password of the username for the service

keyring_name
set_password(service, username, password)

Set password for the username of the service

class keyrings.alt.Google.DocsKeyring(credential, source, crypter, collection=None, client=None, can_create=True, input_getter=<built-in function input>)

Bases: keyring.backend.KeyringBackend

Backend that stores keyring on Google Docs. Note that login and any other initialisation is deferred until it is actually required to allow this keyring class to be added to the global _all_keyring list.

CONFLICT = -1
FAIL = 0
OK = 1
client
collection
delete_password(service, username)
get_password(service, username)

Get password of the username for the service

keyring_title = 'GoogleKeyring'
set_password(service, username, password)

Set password for the username of the service

class keyrings.alt.Google.EnvironCredential

Bases: keyring.credentials.EnvironCredential

Retrieve credentials from specifically named environment variables

class keyrings.alt.Google.KeyczarDocsKeyring

Bases: keyrings.alt.Google.DocsKeyring

Google Docs keyring using keyczar initialized from environment variables

supported()

Return if this keyring supports current environment: -1: not applicable

0: suitable 1: recommended
class keyrings.alt.keyczar.BaseCrypter

Bases: keyring.backend.Crypter

Base Keyczar keyset encryption and decryption. The keyset initialisation is deferred until required.

crypter

The actual keyczar crypter

decrypt(value)

Decrypt the value.

encrypt(value)

Encrypt the value.

encrypting_keyset_location

Location for the encrypting keyset. Use None to indicate that the main keyset is not encrypted

keyset_location

Location for the main keyset that may be encrypted or not

class keyrings.alt.keyczar.Crypter(keyset_location, encrypting_keyset_location=None)

Bases: keyrings.alt.keyczar.BaseCrypter

A Keyczar crypter using locations specified in the constructor

encrypting_keyset_location
keyset_location
class keyrings.alt.keyczar.EnvironCrypter

Bases: keyrings.alt.keyczar.BaseCrypter

A Keyczar crypter using locations specified by environment vars

ENC_KEYSET_ENV_VAR = 'KEYRING_KEYCZAR_ENCRYPTING_LOCATION'
KEYSET_ENV_VAR = 'KEYRING_KEYCZAR_ENCRYPTED_LOCATION'
encrypting_keyset_location
keyset_location
keyrings.alt.keyczar.has_keyczar()
class keyrings.alt.multi.MultipartKeyringWrapper(keyring, max_password_size=512)

Bases: keyring.backend.KeyringBackend

A wrapper around an existing keyring that breaks the password into smaller parts to handle implementations that have limits on the maximum length of passwords i.e. Windows Vault

delete_password(service, username)
get_password(service, username)

Get password of the username for the service

priority = 0
set_password(service, username, password)

Set password for the username of the service

class keyrings.alt.pyfs.BasicKeyring(crypter, filename=None, can_create=True, cache_timeout=None)

Bases: keyring.backend.KeyringBackend

BasicKeyring is a Pyfilesystem-based implementation of keyring.

It stores the password directly in the file, and supports encryption and decryption. The encrypted password is stored in base64 format. Being based on Pyfilesystem the file can be local or network-based and served by any of the filesystems supported by Pyfilesystem including Amazon S3, FTP, WebDAV, memory and more.

config

load the passwords from the config file

decrypt(password_encrypted)

Decrypt the password.

delete_password(service, username)
encrypt(password)

Encrypt the password.

file_path

Much like the property builtin, but only implements __get__, making it a non-data property, and can be subsequently reset.

See http://users.rcn.com/python/download/Descriptor.htm for more information.

>>> class X(object):
...   @NonDataProperty
...   def foo(self):
...     return 3
>>> x = X()
>>> x.foo
3
>>> x.foo = 4
>>> x.foo
4
filename

The filename used to store the passwords.

get_password(service, username)

Read the password from the file.

priority = 2
set_password(service, username, password)

Write the password in the file.

class keyrings.alt.pyfs.EncryptedKeyring(crypter, filename=None, can_create=True, cache_timeout=None)

Bases: keyrings.alt.pyfs.BasicKeyring

Encrypted Pyfilesystem Keyring

class keyrings.alt.pyfs.KeyczarKeyring

Bases: keyrings.alt.pyfs.EncryptedKeyring

Encrypted Pyfilesystem Keyring using Keyczar keysets specified in environment vars

class keyrings.alt.pyfs.PlaintextKeyring(filename=None, can_create=True, cache_timeout=None)

Bases: keyrings.alt.pyfs.BasicKeyring

Unencrypted Pyfilesystem Keyring

keyrings.alt.pyfs.UnicodeWriterAdapter(x)
keyrings.alt.pyfs.has_pyfs()

Does this environment have pyfs installed? Should return False even when Mercurial’s Demand Import allowed import of fs.*.

class keyrings.alt.Windows.EncryptedKeyring

Bases: keyrings.alt.file_base.Keyring

A File-based keyring secured by Windows Crypto API.

decrypt(password_encrypted)

Decrypt the password using the CryptAPI.

encrypt(password)

Encrypt the password using the CryptAPI.

filename = 'wincrypto_pass.cfg'
class keyrings.alt.Windows.OldPywinError(orig)

Bases: object

A compatibility wrapper for old PyWin32 errors, such as reported in https://bitbucket.org/kang/python-keyring-lib/issue/140/

funcname
winerror
classmethod wrap(orig_err)
class keyrings.alt.Windows.RegistryKeyring

Bases: keyring.backend.KeyringBackend

RegistryKeyring is a keyring which use Windows CryptAPI to encrypt the user’s passwords and store them under registry keys

delete_password(service, username)

Delete the password for the username of the service.

get_password(service, username)

Get password of the username for the service

set_password(service, username, password)

Write the password to the registry

keyrings.alt.Windows.has_pywin32()

Does this environment have pywin32? Should return False even when Mercurial’s Demand Import allowed import of win32cred.

keyrings.alt.Windows.has_wincrypto()

Does this environment have wincrypto? Should return False even when Mercurial’s Demand Import allowed import of _win_crypto, so accesses an attribute of the module.

Indices and tables