or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/dnspython@1.16.x
tile.json

tessl/pypi-dnspython

tessl install tessl/pypi-dnspython@1.16.0

DNS toolkit for Python supporting almost all record types with high-level and low-level DNS operations

Agent Success

Agent success rate when using this tile

85%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.37x

Baseline

Agent success rate without this tile

62%

task.mdevals/scenario-7/

Dynamic DNS Update Toolkit

Compose and send dynamic DNS update transactions for a single zone using queued operations with prerequisites and deletions.

Capabilities

Conditional host replacement

  • When given a hostname, expected IPv4 address, and new IPv4 address, build a dynamic update that asserts the expected address is present (or absent when not provided) before replacing the A record with the new value and TTL; the returned summary marks the change as applied. @test
  • If the expected address is supplied but not present, the update should be blocked by the prerequisite and the summary should show no applied changes. @test

TXT cleanup with prerequisite

  • Accept a hostname and optional token string; when a token is provided, assert that one TXT record exactly matches the token before deleting all TXT data for that hostname. @test
  • When no token is provided, delete all TXT data for the hostname without touching other record types. @test

Batched submission

  • Queue multiple operations and emit a single update message for the zone with prerequisites listed before updates, no question section, and TTLs/names matching the queued inputs. @test
  • Send the composed update to the configured nameserver host/port using UDP with a TCP fallback on truncation; return a dictionary containing the response code text, counts of added and deleted records, and whether any change was applied; raise a timeout error when the operation exceeds the configured deadline. @test

Implementation

@generates

API

class DynamicUpdater:
    def __init__(self, zone: str, server: str, port: int = 53, timeout: float | None = None): ...
    def queue_replace_a(self, hostname: str, new_address: str, expected_address: str | None = None, ttl: int = 300) -> None: ...
    def queue_delete_txt(self, hostname: str, required_token: str | None = None) -> None: ...
    def build_message(self):
        """Return the dynamic update message built from queued operations."""
    def apply(self) -> dict:
        """Send the update and return {'rcode': str, 'added': int, 'deleted': int, 'applied': bool}."""

Dependencies { .dependencies }

dnspython { .dependency }

Provides dynamic DNS update helpers and transports.