Validates Sender Policy Framework (SPF) strings to ensure they are formatted correctly.
Project description
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.
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spf_validator-1.4.0.tar.gz.
File metadata
- Download URL: spf_validator-1.4.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f105d0461e5e27c0a61f7d11d692456975792bd20ba2984032475891321c0808
|
|
| MD5 |
f152731885e23fb80a647c629981b894
|
|
| BLAKE2b-256 |
e126189986afe0420653fe460af9e665f003fbb92f956e9a9da904dfbb0be993
|
File details
Details for the file spf_validator-1.4.0-py3-none-any.whl.
File metadata
- Download URL: spf_validator-1.4.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b56dc9882696263f906ba1296db6a78b34907a74c42de1359efd34baef7ecdc
|
|
| MD5 |
e407f7bcbbac06d8a808c4adb2cdc623
|
|
| BLAKE2b-256 |
0d99772c16b57c96330e991249223d47f9083c84ecc5ce913805ccff68d81761
|