Introduction
This module provides access to authentication credentials stored in .authinfo files.
.authinfo files are based on .netrc files, and allow a bit more flexibility, but losing macro support.
They contain entries, formated as plain text, with key=${value} format fields.
.authinfo files are multiprotocol and allow to do advanced matching.
.authinfo files are typically encrypted using GPG, and this library will invoke GPG to decrypt .authinfo.gpg files.
References:
.netrc stuff:
.authinfo stuff:
emacs’s auth-source.el, function auth-source-netrc-parse.
Usage
TL;DR: Here’s an example, and for now refer to the tests and code for more.
import authinfo
...
entry = get_entry(
machine='smtp.example.org',
)
Metadata
Release files for authinfo 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| authinfo-0.0.4.tar.gz | 3.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| authinfo-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.2 kB
Release files / authinfo-0.0.4.tar.gz
| Download URL | authinfo-0.0.4.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
320f77655f9d6116defae60f67cf6f8d47fae00a6d413f2a7f66d7abd2ebd393
|
|
BLAKE2b-256 checksum How to use checksums |
b74a6f62cf9af1e722a83757e6327b719cd0578de1325e17c2351265bf1a41bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.7
|
Release files / authinfo-0.0.4-py3-none-any.whl
| Download URL | authinfo-0.0.4-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6cb67ea87f5c80f147b624280a85a33404ed1b8b9b7dc2d3f1d08fb4f575d0a5
|
|
BLAKE2b-256 checksum How to use checksums |
28b9c9ec0d7a479b1f692f25a87a57ec736fd475e21ec58acad5485fae4bcbf6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.7
|