Trueform Python SDK
The official Python client for the Trueform email validation API.
Python SDK documentation | API reference
Install
pip install trueform-cloud
Requires Python 3.10 or newer. The SDK has no runtime dependencies and requires no API key.
Quickstart
from trueform_cloud import Trueform
trueform = Trueform()
validation = trueform.validations.create(email="user@example.com")
if validation.is_deliverable:
print("Email looks good")
Handle validation results
Validation results are frozen, slotted dataclasses with complete type annotations:
if validation.did_you_mean:
print(f"Did you mean {validation.did_you_mean}?")
if validation.is_disposable:
print("Ask for a permanent email address")
Available attributes:
emailis_valid_formatis_freemailis_disposablehas_mx_recordsdid_you_meanis_deliverable
is_deliverable is a domain-level verdict. It does not prove that a specific mailbox exists.
Configure the client
Timeout values and retry delays use seconds:
trueform = Trueform(timeout=5, max_retries=2)
Override options for one request:
validation = trueform.validations.create(
email="user@example.com",
timeout=2,
max_retries=0,
)
The client retries connection failures, timeouts, rate limits, and server errors. A Retry-After
response header controls the delay when present. Use base_url= to point the client at a different
Trueform-compatible endpoint.
Errors
from trueform_cloud import InvalidRequestError, RateLimitError, Trueform
trueform = Trueform()
try:
validation = trueform.validations.create(email="user@example.com")
except RateLimitError as error:
print(f"Retry after {error.retry_after} seconds")
except InvalidRequestError as error:
print(error)
Exported exceptions:
TrueformErrorAPIErrorInvalidRequestErrorRateLimitErrorConnectionErrorTimeoutError
Exceptions expose code, status, request_id, and retry_after when available.
Development
python -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"
python -m ruff check .
python -m mypy
python -m pytest
python -m build
python -m twine check dist/*
python scripts/check_package.py dist/*
Read CONTRIBUTING.md before opening a pull request. Report vulnerabilities through the process in SECURITY.md.
License
MIT. See LICENSE.
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 trueform_cloud-0.1.0.tar.gz.
File metadata
- Download URL: trueform_cloud-0.1.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1fb27770e1fc1ad68667a755659b1d2c0c54e88d4d106e107c8285f54ca0246
|
|
| MD5 |
797ff1655105d14543bff7e29b930c80
|
|
| BLAKE2b-256 |
c518c079983f9b7b5e4ae43a9e7530e5e18ce22db86b5c91f46d502245168b2f
|
Provenance
The following attestation bundles were made for trueform_cloud-0.1.0.tar.gz:
Publisher:
release.yml on True-Form-Cloud/trueform-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trueform_cloud-0.1.0.tar.gz -
Subject digest:
b1fb27770e1fc1ad68667a755659b1d2c0c54e88d4d106e107c8285f54ca0246 - Sigstore transparency entry: 2454658140
- Sigstore integration time:
-
Permalink:
True-Form-Cloud/trueform-python-sdk@a734637f9de09b0a0aad70fc21910e0f998f1132 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/True-Form-Cloud
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a734637f9de09b0a0aad70fc21910e0f998f1132 -
Trigger Event:
push
-
Statement type:
File details
Details for the file trueform_cloud-0.1.0-py3-none-any.whl.
File metadata
- Download URL: trueform_cloud-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1daa0738636820f7ad5e05220e99c36ac674c14ba8df7724c8b3ae0b5f03de9f
|
|
| MD5 |
a55e280407fb23ca70d4e53f4fbe4085
|
|
| BLAKE2b-256 |
9109a9edd6c5f9925f7e2624850194f6a0d7f1c0852035b0a17d30840f6969c6
|
Provenance
The following attestation bundles were made for trueform_cloud-0.1.0-py3-none-any.whl:
Publisher:
release.yml on True-Form-Cloud/trueform-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trueform_cloud-0.1.0-py3-none-any.whl -
Subject digest:
1daa0738636820f7ad5e05220e99c36ac674c14ba8df7724c8b3ae0b5f03de9f - Sigstore transparency entry: 2454658238
- Sigstore integration time:
-
Permalink:
True-Form-Cloud/trueform-python-sdk@a734637f9de09b0a0aad70fc21910e0f998f1132 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/True-Form-Cloud
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a734637f9de09b0a0aad70fc21910e0f998f1132 -
Trigger Event:
push
-
Statement type: