spf-validator
spf-validator is a Python package for validating Sender Policy Framework strings and records to ensure they are formatted correctly.
The validation returns a list of strings where each string, if any, is an issue with the SPF record.
Installation
Use pip to install:
pip install spf-validator
Usage
There are two main functions in the package: validate_spf_string and validate_domain_spf. Both of these will return a list of strings where each string, if any, is an issue with the SPF record.
To validate an SPF string, use validate_spf_string by passing it the string.
To use:
from spf_validator import validator
issues_list = validator.validate_spf_string('v=spf1 a mx include:_spf.google.com ~all')
To validate an SPF record on a given domain, use validate_domain_spf by passing it the domain. This will retrieve the TXT records for the domain, locate the SPF record, and validate it.
To use:
from spf_validator import validator
issues_list = validator.validate_domain_spf('google.com')
Contributing
Community made feature requests, patches, bug reports, and contributions are always welcome. This project uses Poetry for dependency management and Ruff for linting.
Please review our contributing guidelines if you decide to make a contribution.
License
This project is licensed under the MIT License. See LICENSE for more details.
Metadata
Release files for spf-validator 1.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| spf_validator-1.4.1.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spf_validator-1.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.6 kB
Release files / spf_validator-1.4.1.tar.gz
| Download URL | spf_validator-1.4.1.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab1a63d40fe96fa33b64fab3c4f760575083a62fe8a89eef2d0bb8ca4f610db0
|
|
BLAKE2b-256 checksum How to use checksums |
5b56787cc09142f4063cf32908643cbaa0f760d55380397889a62a4a16765d97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / spf_validator-1.4.1-py3-none-any.whl
| Download URL | spf_validator-1.4.1-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
817c9e24341ecfc28725f1cec68da083cab53a49f5715a076a4440b0f96ff18b
|
|
BLAKE2b-256 checksum How to use checksums |
08c29ba7c5a6a6391426a734b2cfccca9112a41b311d77b4de07eea37a4644c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|