Registry / serialization / authres

authres

JSON →
library1.2.0pypypi✓ verified 85d ago

A Python library for parsing and generating email Authentication-Results headers as defined in RFC 8601. Current version 1.2.0, stable release cadence is low (last update 2021).

pip install authres
INSTALL
IMPORT
SIG · AUTHRES
A
authres
serializationpythonv1.2.0
Install
2.4s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.4s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AuthenticationResultsHeader
from authres import AuthenticationResultsHeader
Always use this import; no common wrong alternative.

Parse and generate Authentication-Results headers.

from authres import AuthenticationResultsHeader # Parse an Authentication-Results header header = 'dmarc=pass header.from=example.com; spf=pass smtp.mailfrom=email@example.com' parsed = AuthenticationResultsHeader.parse(header) print(parsed.results) # Generate a new header from authres import AuthenticationResultsHeader, AuthResult result = AuthResult('dmarc', 'pass', {'header.from': 'example.com'}) header_obj = AuthenticationResultsHeader('mail.example.com', [result]) print(str(header_obj))
Debug
Known issues
gotchaThe library only supports RFC 8601, not earlier drafts. Headers using 'smtp.mailfrom' (with dot) vs 'smtp.mailfrom' (underscore) may cause parsing issues.
fix
Ensure your header strings use RFC 8601 format exactly.
affects: 1.0.0 - 1.2.0
gotchaParsing multiple header lines requires concatenating them with newlines; passing them as separate arguments is not supported.
fix
Supply the entire header value as a single string, with newlines separating lines if multi-line.
affects: all
deprecatedThe library is no longer actively maintained; no updates since 2021. It may not work with future Python versions.
fix
Consider alternatives or pin Python version (tested up to 3.10).
affects: all
Errors
Common errors & fixes
AttributeError: module 'authres' has no attribute 'AuthenticationResultsHeader'
The import path is correct but some installations may have a different version or package name collision.
fix
Run 'pip install --upgrade authres' to ensure version 1.2.0 installed.
TypeError: AuthenticationResultsHeader.parse() takes 1 positional argument but 2 were given
Trying to pass additional parameters like instance method incorrectly.
fix
Use AuthenticationResultsHeader.parse(header_string) without extra arguments.
ValueError: Invalid header format
Header string does not conform to RFC 8601 syntax, e.g., missing '=' in key-value pairs.
fix
Ensure header format: 'method=result key=value' with spaces separating key-value pairs.
Upgrade
Version history
1.2.0latest on PyPI · released Aug 3, 2019
Audit
Dependencies

No dependency data recorded yet.

Agent activity
40 hits · last 30 days
node
32
OpenAI (training)
1
Resources
authres — pip install authres · libregistry