get-passphrase
Extensible passphrase resolver, supporting prompting as well as passphrases stored in environment variables, files or keyrings
Some examples of smart passphrase descriptors:
pass:<passphrase>to directly provide a passphrase inlineenv:<env-var-name>to get the passphrase from an environment variable. The application may configure a custom environment dictionary, oros.osenviron()is usedfile:<file-name>to get the passphrase from the file at location pathname. The application may configure a base directory for relative paths, or the current working directory is used.fd:<file-descriptor-number>read the passphrase from the provided file descriptor numberstdin:to read from standard inputprompt:to prompt the user with "Password: " and read from console with typed characters hidden (uses getpass)prompt:<prompt-string>to prompt the user with a custom prompt string and read from console with typed characters hidden (uses getpass)keyring:<service-name>,<key-name>to load the passphrase from keyring. The application may configure a prefix that will be prepended to either the service-name or the key-name or both, to define a unique namespace for the application.keyring:<key-name>to load the passphrase from keyring, using a default service name configured by the application. The application may configure a prefix that will be prepended to key-name, to define a unique namespace for the application.none:To provide aNonevalue for the passphrase (useful for chaining defaults)empty:To provide an empty passphrase
Command tool
A command tool, get-passphrase, is provided that will expand a smart passphrase descriptor provided as an argument.
Usage:
usage: get-passphrase [-h] [--version] [passphrase [passphrase ...]]
Resolve a passphrase in a number of ways.
positional arguments:
passphrase A list of smart passphrase descriptors to be checked in order. The first one that produces a passphrase is used.
optional arguments:
-h, --help show this help message and exit
--version Display version
Library
Usage
from get_passphrase import resolve_passphrase
descriptor = input("Enter smart passphrase descriptor:")
print("Passphrase is: ", resolve_passphrase(descriptor).get_cleartext())
Metadata
Release files for get-passphrase 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| get-passphrase-1.0.0.tar.gz | 9.2 kB | Without provenance | Details for get-passphrase-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| get_passphrase-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for get_passphrase-1.0.0-py3-none-any.whl |
Total release size: 23.5 kB
Release files / get-passphrase-1.0.0.tar.gz
| Download URL | get-passphrase-1.0.0.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ddb3b6cc289a4660a2940b07e970b68c328feeb5bcc54f7ed3c19193f5f7da16
|
|
BLAKE2b-256 checksum How to use checksums |
6f8aa94e88d0ea09495fb70612802b87554248f47f092025a1f9829512c99294
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.10 Linux/5.4.0-99-generic
|
Release files / get_passphrase-1.0.0-py3-none-any.whl
| Download URL | get_passphrase-1.0.0-py3-none-any.whl |
|---|---|
| Size | 14.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5ccb1ad8560505c0f62938baa1324084bf4c31c4a9cbcb4e95f7ac44ec5a8b79
|
|
BLAKE2b-256 checksum How to use checksums |
fb4d9902c7a49fdf6881bf344076c12227998071630608fa34ef129a8fe1e05f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.10 Linux/5.4.0-99-generic
|
Security for get-passphrase 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.