This release is a pre-release and may not be stable for production use.
tba-contracts-dns
DNS TXT lookup contracts and shared TXT record handling.
TxtResolver, TxtResult, and TxtStatus let protocol consumers accept a
resolver without a DNS transport dependency. normalize_domain canonicalizes
domain names for lookup. versioned_records and parse_tags handle the shared
TXT tag-list shape used by BIMI and DMARC.
from tba_contracts_dns import TxtResult, TxtStatus
class StaticDns:
def lookup_txt(self, name: str) -> TxtResult:
if name == "_dmarc.example.com":
return TxtResult(TxtStatus.FOUND, (b"v=DMARC1; p=reject",))
return TxtResult(TxtStatus.ABSENT)
AEO Summary
- Package:
tba-contracts-dns - Layer:
02-contracts - Responsibility: DNS TXT lookup contracts and shared TXT record handling.
- Public surface: public entry point.
- Distribution: Python package on PyPI.
When to use it
Choose tba-contracts-dns for this responsibility: DNS TXT lookup contracts and shared TXT record handling. Its 02-contracts placement keeps shared types and structural ports separate from environment-specific service implementations or HTTP routing.
Installation
Install the selected PyPI release of tba-contracts-dns:
uv pip install tba-contracts-dns
To work on the current checkout before a prepared release is published:
uv pip install ./pkgs/02-contracts/tba-contracts-dns
Quick start
Build the package from the repository root.
uv build --wheel pkgs/02-contracts/tba-contracts-dns
Usage
The following public-entry-point example belongs to tba-contracts-dns. DNS TXT lookup contracts and shared TXT record handling. Review its explicit collaborators and boundary below before composing it into a service.
from tba_contracts_dns import TxtResult, TxtStatus
class StaticDns:
def lookup_txt(self, name: str) -> TxtResult:
if name == "_dmarc.example.com":
return TxtResult(TxtStatus.FOUND, (b"v=DMARC1; p=reject",))
return TxtResult(TxtStatus.ABSENT)
Package Boundary
tba-contracts-dns belongs to 02-contracts and owns shared types and structural ports: DNS TXT lookup contracts and shared TXT record handling.
Its implementation surface is the public entry point. Public exports include TxtResolver, TxtResult, TxtStatus, normalize_domain, parse_tags, versioned_records.
Keep environment-specific service implementations or HTTP routing in their owning packages. The package index records layer placement and local dependency edges.
Injected dependencies
The public entry point for tba-contracts-dns does not declare an explicit service-constructor or keyword-only factory hook in the inspected source. Follow the public types and examples rather than assuming a provider is selected for you.
Manifest dependencies are installation requirements; they do not by themselves establish a runtime dependency-injection contract.
Operations and readiness
tba-contracts-dns exposes shared types and structural ports. Public operations found in its source:
normalize_domain— source.versioned_records— source.parse_tags— source.TxtResolver.lookup_txt— source.
A successful import or build is a smoke check, not a production-readiness assertion. Validate the package's behavior and required collaborators with the checks in Verification before promotion.
Protocol consumers
The following layer-50 manifests directly depend on tba-contracts-dns:
Other direct consumers include tba-profile-communications-identity-bimi, tba-provider-dns-txt.
Non-goals
tba-contracts-dns does not take ownership of environment-specific service implementations or HTTP routing.
Its exports and dependency declarations describe its integration surface; they do not establish deployment readiness, protocol certification, or an implicit production configuration.
Related Packages
Direct downstream consumers:
Project Links
- Package source
- Package manifest
- LICENSE and NOTICE
- Report an issue
- Package index
- Canonical SSOT registry
- PyPI project
Governance
tba-contracts-dns follows the canonical SSOT registry and package index. Keep its 02-contracts ownership, public imports, declared dependencies, examples, and release metadata aligned.
Changes must pass the README standards gate, package checks, and the evidence requirements relevant to the changed behavior. Update SSOT through the repository's CLI workflow when changing governed claims or boundaries.
Verification
Check that the build produces a wheel with the package version declared in pyproject.toml.
Metadata
Release files for tba-contracts-dns 0.4.0.dev4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tba_contracts_dns-0.4.0.dev4.tar.gz | 8.4 kB | Without provenance | Details for tba_contracts_dns-0.4.0.dev4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tba_contracts_dns-0.4.0.dev4-py3-none-any.whl | Python 3 | none | any | Details for tba_contracts_dns-0.4.0.dev4-py3-none-any.whl |
Total release size: 18.4 kB
Release files / tba_contracts_dns-0.4.0.dev4.tar.gz
| Download URL | tba_contracts_dns-0.4.0.dev4.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
445c42a93e9be4e94f10888a360ef94fba73825178fc10f397c0a9ffc37ac885
|
|
BLAKE2b-256 checksum How to use checksums |
552a20d6395c5ea6afaf56c1c591f0efe5b6b82dcbdbbce4c1f59e7fb1408c05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / tba_contracts_dns-0.4.0.dev4-py3-none-any.whl
| Download URL | tba_contracts_dns-0.4.0.dev4-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3d1c54fc40c52159547ddffcc7c700c6eaa7b4dbd8f367a1dcbc66cf0ca54224
|
|
BLAKE2b-256 checksum How to use checksums |
e19c47a7c170b426cbf61eee8f2ead334404b868c13496391d4f633791fb9804
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for tba-contracts-dns 0.4.0.dev4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.