Flexible yet simple password reader and writer.
Project description
Flexpass
Flexible yet simple password reader and writer.
WARNING: alpha stage. Not suitable for production.
Install
pip install flexpass
Feature
This library provides read/write access to passwords identified by a name, through the following functions:
def get_password(name: str) -> str|None:
...
def set_password(name: str, password: str, **options) -> None:
...
def delete_password(name: str) -> bool:
...
def list_passwords() -> list[PasswordInfo]:
...
Function get_password
requests all registered backends by decreasing priority until the password is found.
Function set_password
sets the password in the read-write backend with the highest priority.
Function delete_password
deletes the password in all read-write backends where the password was set. It returns True
if the password was set in at least one backend.
Function list_passwords
returns a list of the password names associated with information from the backends.
Access to passwords is also possible for a specific backend, by using this backend method. Examples:
backend = get_backend('pass')
backend.get_password('my/password')
These functions are also accessible through a command-line interface. See:
flexpass --help
Backends
The following backends are included:
Name(s) | Priority | Description |
---|---|---|
pass, gpg | 10 | |
libsecret | 6 | |
wincred | 5 | |
runsecrets | 3 | |
env | 1 |
Additional backends may be added using register_backend_class
function.
Priorities may be modified by calling register_backend_class
again with priority
argument.
NOTE: use priority 0
to disable a backend.
Credits
I was inspired by:
- pass
- keyring. Differences:
keyring
is a lot more mature and has many more backends.flexpass
does not require to specify a username in addition to the password name.flexpass
aims at including common password managers without requiring additional packages, especially for servers without desktops and for Docker containers.flexpass
gives easily access to the list of passwords.
Icon created by Pixel perfect - Flaticon.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for flexpass-0.0.1a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90702254a0f3eb6a446775b94742e970ea996cbcffa9169a5b9d4d07c28da8a9 |
|
MD5 | b3274b2724bdd501dd07ce5ac6cee676 |
|
BLAKE2b-256 | e66d92c76b6f8e5af78bca2931924338c1e27d6fcca317efea79ef41a139cc32 |