dnspython の API リファレンス
dnspython (rthalley/dnspython) の公開 API 400 件 —— クラス 187、関数 68、メソッド 145。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。
リポジトリ: rthalley/dnspython
| 種別 | 件数 |
|---|---|
| クラス | 187 |
| 関数 | 68 |
| メソッド | 145 |
API 一覧
func
dns._features.force(feature:str, enabled:bool) -> NoneForce the status of *feature* to be *enabled*.
func
dns._features.have(feature:str) -> boolIs *feature* available?
func
dns.asyncbackend.get_backend(name:str) -> BackendGet the specified asynchronous backend.
func
dns.asyncbackend.get_default_backend() -> BackendGet the default backend, initializing it if necessary.
func
dns.asyncbackend.set_default_backend(name:str) -> BackendSet the default backend.
func
dns.asyncquery.send_tcp(sock:dns.asyncbackend.StreamSocket, what:dns.message.Message | bytes, expiration:float | None=None) -> tuple[int, float]Send a DNS message to the specified TCP socket.
class
dns.asyncresolver.ResolverAsynchronous DNS stub resolver.
method
dns.asyncresolver.Resolver.canonical_name(name:dns.name.Name | str) -> dns.name.NameDetermine the canonical name of *name*.
func
dns.asyncresolver.canonical_name(name:dns.name.Name | str) -> dns.name.NameDetermine the canonical name of *name*.
func
dns.asyncresolver.reset_default_resolver() -> NoneRe-initialize default asynchronous resolver.
func
dns.asyncresolver.resolve_address(ipaddr:str, *args:Any, **kwargs:Any) -> dns.resolver.AnswerUse a resolver to run a reverse query for PTR records.
class
dns.btree.BTreeAn in-memory BTree with copy-on-write and cursors.
method
dns.btree.BTree.cursor() -> Cursor[KT, ET]Create a cursor.
method
dns.btree.BTree.delete_exact(element:ET) -> ET | NoneDelete *element* from the BTree.
method
dns.btree.BTree.delete_key(key:KT) -> ET | NoneDelete the element matching *key* from the BTree.
method
dns.btree.BTree.deregister_cursor(cursor:Cursor) -> NoneDeregister a cursor from the automatic parking service.
method
dns.btree.BTree.insert_element(elt:ET, in_order:bool=False) -> ET | NoneInsert the element into the BTree.
method
dns.btree.BTree.make_immutable()Make the BTree immutable.
method
dns.btree.BTree.register_cursor(cursor:Cursor) -> NoneRegister a cursor for the automatic parking service.
method
dns.btree.BTree.visit_in_order(visit:Callable[[ET], None]) -> NoneCall *visit*(element) on all elements in the tree in sorted order.
class
dns.btree.BTreeDictA MutableMapping implemented with a BTree.
class
dns.btree.BTreeSetA MutableSet implemented with a BTree.
class
dns.btree.CursorA seekable cursor for a BTree.
method
dns.btree.Cursor.next() -> ET | NoneGet the next element, or return None if on the right boundary.
method
dns.btree.Cursor.park()Park the cursor.
method
dns.btree.Cursor.seek(key:KT, before:bool=True) -> NoneSeek to the specified key.
method
dns.btree.Cursor.seek_first() -> NoneSeek to the left boundary (i.e.
method
dns.btree.Cursor.seek_last() -> NoneSeek to the right boundary (i.e.
class
dns.btree.ElementAll items stored in the BTree are Elements.
method
dns.btree.Element.key() -> KTThe key for this element; the returned type must implement comparison.
class
dns.btree.ImmutableThe BTree is immutable.
class
dns.btree.KVThe BTree element type used in a ``BTreeDict``.
class
dns.btree.MemberThe BTree element type used in a ``BTreeSet``.
class
dns.btreezone.DelegationsA sorted set of delegation-point names.
method
dns.btreezone.Delegations.get_delegation(name:dns.name.Name) -> tuple[dns.name.Name | None, bool]Get the delegation applicable to *name*, if it exists.
method
dns.btreezone.Delegations.is_glue(name:dns.name.Name) -> boolIs *name* glue, i.e.
class
dns.btreezone.ImmutableNodeAn immutable :py:class:`dns.btreezone.Node`.
class
dns.btreezone.NodeFlagsFlags that classify a node's role in the zone.
class
dns.btreezone.WritableVersionA mutable version of a :py:class:`dns.btreezone.Zone`.
method
dns.btreezone.WritableVersion.delete_node(name:dns.name.Name) -> NoneDelete the node at *name*, updating delegation tracking as needed.
class
dns.btreezone.ZoneA versioned DNS zone backed by a BTree.
func
dns.dnssec.algorithm_from_text(text:str) -> AlgorithmConvert text into a DNSSEC algorithm value.
func
dns.dnssec.cds_rdataset_to_ds_rdataset(rdataset:dns.rdataset.Rdataset) -> dns.rdataset.RdatasetCreate a CDS record from DS.
func
dns.dnssec.dnskey_rdataset_to_cdnskey_rdataset(rdataset:dns.rdataset.Rdataset) -> dns.rdataset.RdatasetCreate a CDNSKEY record from DNSKEY.
func
dns.dnssec.key_id(key:DNSKEY | CDNSKEY) -> intReturn the key id (a 16-bit number) for the specified key.
func
dns.dnssec.make_cds(name:dns.name.Name | str, key:dns.rdata.Rdata, algorithm:DSDigest | str, origin:dns.name.Name | None=None) -> CDSCreate a CDS record for a DNSSEC key.
func
dns.dnssec.make_ds(name:dns.name.Name | str, key:dns.rdata.Rdata, algorithm:DSDigest | str, origin:dns.name.Name | None=None, policy:Policy | None=None, validating:bool=False) -> DSCreate a DS record for a DNSSEC key.
func
dns.dnssec.to_timestamp(value:datetime | str | float | int) -> intConvert various format to a timestamp
func
dns.dnssecalgs.get_algorithm_cls(algorithm:int | str, prefix:AlgorithmPrefix=None) -> type[GenericPrivateKey]Get Private Key class from Algorithm.
func
dns.dnssecalgs.get_algorithm_cls_from_dnskey(dnskey:DNSKEY) -> type[GenericPrivateKey]Get Private Key class from DNSKEY.
func
dns.dnssecalgs.register_algorithm_cls(algorithm:int | str, algorithm_cls:type[GenericPrivateKey], name:dns.name.Name | str | None=None, oid:bytes | None=None) -> NoneRegister Algorithm Private Key class.
class
dns.dnssectypes.DSDigestDNSSEC Delegation Signer Digest Algorithm
class
dns.dnssectypes.NSEC3HashNSEC3 hash algorithm
func
dns.e164.to_e164(name:dns.name.Name, origin:dns.name.Name | None=public_enum_domain, want_plus_prefix:bool=True) -> strConvert an ENUM domain name into an E.164 number.
class
dns.edns.ECSOptionEDNS Client Subnet (ECS, RFC7871)
class
dns.edns.EDECodeExtended DNS Error (EDE) codes
class
dns.edns.EDEOptionExtended DNS Error (EDE, RFC8914)
class
dns.edns.FilteringContactOptionFiltering contact (FILTERING-CONTACT)
class
dns.edns.FilteringDBOptionFiltering DB (FILTERING-DB)
class
dns.edns.FilteringOrganizationOptionFiltering organization (FILTERING-ORGANIZATION)
class
dns.edns.OptionBase class for all EDNS option types.
method
dns.edns.Option.from_wire_parser(otype:OptionType, parser:'dns.wire.Parser') -> 'Option'Build an EDNS option object from wire format.
method
dns.edns.Option.to_wire(file:Any | None=None) -> bytes | NoneConvert an option to wire format.
class
dns.edns.OptionTypeEDNS option type codes
func
dns.edns.get_option_class(otype:OptionType) -> AnyReturn the class for the specified option type.
func
dns.edns.option_from_wire(otype:OptionType | str, wire:bytes, current:int, olen:int) -> OptionBuild an EDNS option object from wire format.
func
dns.edns.option_from_wire_parser(otype:OptionType | str, parser:'dns.wire.Parser') -> OptionBuild an EDNS option object from wire format.
func
dns.edns.register_type(implementation:Any, otype:OptionType) -> NoneRegister the implementation of an option type.
method
dns.enum.IntEnum.make(value:int | str) -> TIntEnumConvert text or a value into an enumerated type, if possible.
class
dns.exception.DNSExceptionAbstract base class shared by all dnspython exceptions.
class
dns.exception.DeniedByPolicyDenied by DNSSEC policy.
class
dns.exception.FormErrorDNS message is malformed.
class
dns.exception.SyntaxErrorText input is malformed.
class
dns.exception.TimeoutThe DNS operation timed out.
class
dns.exception.TooBigThe DNS message is too big.
class
dns.exception.UnexpectedEndText input ended unexpectedly.
class
dns.exception.UnsupportedAlgorithmThe DNSSEC algorithm is not supported.
class
dns.exception.ValidationFailureThe DNSSEC signature is invalid.
func
dns.flags.from_text(text:str) -> intConvert a space-separated list of flag text values into a flags value.
func
dns.flags.to_text(flags:int) -> strConvert a flags value into a space-separated list of flag text values.
func
dns.immutable.constify(o:Any) -> AnyConvert mutable types to immutable types.
func
dns.inet.af_for_address(text:str) -> intDetermine the address family of a textual-form network address.
func
dns.inet.inet_ntop(family:int, address:bytes) -> strConvert the binary form of a network address into its textual form.
func
dns.inet.inet_pton(family:int, text:str) -> bytesConvert the textual form of a network address into its binary form.
func
dns.inet.is_address(text:str) -> boolIs the specified string an IPv4 or IPv6 address?
func
dns.inet.is_multicast(text:str) -> boolIs the textual-form network address a multicast address?
func
dns.inet.low_level_address_tuple(high_tuple:tuple[str, int], af:int | None=None) -> AnyGiven a "high-level" address tuple, i.e.
func
dns.ipv4.inet_aton(text:str | bytes) -> bytesConvert an IPv4 address in text form to binary form.
func
dns.ipv4.inet_ntoa(address:bytes) -> strConvert an IPv4 address in binary form to text form.
func
dns.ipv6.inet_aton(text:str | bytes, ignore_scope:bool=False) -> bytesConvert an IPv6 address in text form to binary form.
func
dns.ipv6.inet_ntoa(address:bytes) -> strConvert an IPv6 address in binary form to text form.
func
dns.ipv6.is_mapped(address:bytes) -> boolIs the specified address a mapped IPv4 address?
class
dns.message.AnswerForNXDOMAINThe rcode is NXDOMAIN but an answer was found.
class
dns.message.ChainTooLongThe CNAME chain is too long.
class
dns.message.CopyModeHow should sections be copied when making an update response?
class
dns.message.MessageA DNS message.
method
dns.message.Message.additional() -> list[dns.rrset.RRset]The additional data section.
method
dns.message.Message.answer() -> list[dns.rrset.RRset]The answer section.
method
dns.message.Message.authority() -> list[dns.rrset.RRset]The authority section.
method
dns.message.Message.get_options(otype:dns.edns.OptionType) -> list[dns.edns.Option]Return the list of options of the specified type.
method
dns.message.Message.is_response(other:'Message') -> boolIs *other* a response to this message?
method
dns.message.Message.opcode() -> dns.opcode.OpcodeReturn the opcode.
method
dns.message.Message.question() -> list[dns.rrset.RRset]The question section.
method
dns.message.Message.rcode() -> dns.rcode.RcodeReturn the rcode.
method
dns.message.Message.section_count(section:SectionType) -> intReturns the number of records in the specified section.
method
dns.message.Message.set_opcode(opcode:dns.opcode.Opcode) -> NoneSet the opcode.
method
dns.message.Message.set_rcode(rcode:dns.rcode.Rcode) -> NoneSet the rcode.
method
dns.message.Message.to_styled_text(style:MessageStyle) -> strConvert the message to styled text.
method
dns.message.Message.to_text(origin:dns.name.Name | None=None, relativize:bool=True, style:MessageStyle | None=None, **kw:Any) -> strConvert the message to text.
method
dns.message.Message.use_edns(edns:int | bool | None=0, ednsflags:int=0, payload:int=DEFAULT_EDNS_PAYLOAD, request_payload:int | None=None, options:list[dns.edns.Option] | None=None, pad:int=0) -> NoneConfigure EDNS behavior.
method
dns.message.Message.want_dnssec(wanted:bool=True) -> NoneEnable or disable 'DNSSEC desired' flag in requests.
class
dns.message.MessageSectionMessage sections
class
dns.message.MessageStyleMessage text styles.
class
dns.message.NoPreviousNameNo previous name was known.
class
dns.message.NotQueryResponseMessage is not a response to a query.
class
dns.message.ShortHeaderThe DNS packet passed to from_wire() is too short.
class
dns.message.TruncatedThe truncated flag is set.
class
dns.message.UnknownTSIGKeyA TSIG with an unknown key was received.
func
dns.message.from_file(f:Any, idna_codec:dns.name.IDNACodec | None=None, one_rr_per_rrset:bool=False) -> MessageRead the next text format message from the specified file.
class
dns.name.BadEscapeAn escaped code in a text format of DNS name is invalid.
class
dns.name.BadLabelTypeThe label type in DNS name wire format is unknown.
class
dns.name.BadPointerA DNS compression pointer points forward instead of backward.
class
dns.name.EmptyLabelA DNS label is empty.
class
dns.name.IDNA2003CodecIDNA 2003 encoder/decoder.
method
dns.name.IDNA2003Codec.decode(label:bytes) -> strDecode *label*.
method
dns.name.IDNA2003Codec.encode(label:str) -> bytesEncode *label*.
class
dns.name.IDNA2008CodecIDNA 2008 encoder/decoder.
class
dns.name.IDNACodecAbstract base class for IDNA encoder/decoders.
class
dns.name.IDNAExceptionIDNA processing raised an exception.
class
dns.name.LabelTooLongA DNS label is > 63 octets long.
class
dns.name.NameA DNS name.
method
dns.name.Name.choose_relativity(origin:'Name | None'=None, relativize:bool=True) -> 'Name'Return a name with the relativity desired by the caller.
method
dns.name.Name.concatenate(other:'Name') -> 'Name'Return a new name which is the concatenation of self and other.
method
dns.name.Name.fullcompare(other:'Name') -> tuple[NameRelation, int, int]Compare two names, returning a 3-tuple ``(relation, order, nlabels)``.
method
dns.name.Name.is_absolute() -> boolIs the most significant label of this name the root label?
method
dns.name.Name.is_subdomain(other:'Name') -> boolIs self a subdomain of other?
method
dns.name.Name.is_superdomain(other:'Name') -> boolIs self a superdomain of other?
method
dns.name.Name.is_wild() -> boolIs this name wild?
method
dns.name.Name.parent() -> 'Name'Return the parent of the name.
method
dns.name.Name.predecessor(origin:'Name', prefix_ok:bool=True) -> 'Name'Return the maximal predecessor of the name in the DNSSEC ordering.
method
dns.name.Name.split(depth:int) -> tuple['Name', 'Name']Split a name into a prefix and suffix names at the specified depth.
method
dns.name.Name.successor(origin:'Name', prefix_ok:bool=True) -> 'Name'Return the minimal successor of the name in the DNSSEC ordering.
method
dns.name.Name.to_digestable(origin:'Name | None'=None) -> bytesConvert name to a format suitable for digesting in hashes.
method
dns.name.Name.to_styled_text(style:NameStyle) -> strConvert name to text format, applying the style.
method
dns.name.Name.to_text(omit_final_dot:bool=False, style:NameStyle | None=None) -> strConvert name to DNS text format.
method
dns.name.Name.to_unicode(omit_final_dot:bool=False, idna_codec:IDNACodec | None=None, style:NameStyle | None=None) -> strConvert name to DNS text format.
method
dns.name.Name.to_wire(file:Any | None=None, compress:CompressType | None=None, origin:'Name | None'=None, canonicalize:bool=False) -> bytes | NoneConvert name to wire format, possibly compressing it.
class
dns.name.NameRelationName relation result from fullcompare().
class
dns.name.NameStyleName text styles.
class
dns.name.NameTooLongA DNS name is > 255 octets long.
func
dns.name.from_text(text:bytes | str, origin:Name | None=root, idna_codec:IDNACodec | None=None) -> NameConvert text into a :py:class:`dns.name.Name` object.
func
dns.name.from_unicode(text:str, origin:Name | None=root, idna_codec:IDNACodec | None=None) -> NameConvert unicode text into a :py:class:`dns.name.Name` object.
func
dns.name.set_default_idna_codec(idna_codec:IDNACodec)Set the default IDNA codec.
class
dns.namedict.NameDictA dictionary whose keys are dns.name.Name objects.
class
dns.node.NodeA Node is a set of rdatasets.
method
dns.node.Node.classify() -> NodeKindClassify a node.
method
dns.node.Node.replace_rdataset(replacement:dns.rdataset.Rdataset) -> NoneReplace an rdataset.
method
dns.node.Node.to_styled_text(style:NodeStyle, name:dns.name.Name) -> strConvert a node to text format.
method
dns.node.Node.to_text(name:dns.name.Name, style:NodeStyle | None=None, **kw:Any) -> strConvert a node to text format.
class
dns.node.NodeKindRdatasets in nodes
class
dns.node.NodeStyleNode text styles.
class
dns.opcode.UnknownOpcodeAn DNS opcode is unknown.
func
dns.opcode.from_flags(flags:int) -> OpcodeExtract an opcode from DNS message flags.
func
dns.opcode.from_text(text:str) -> OpcodeConvert text into an opcode.
func
dns.opcode.is_update(flags:int) -> boolIs the opcode in flags UPDATE?
func
dns.opcode.to_flags(value:Opcode) -> intConvert an opcode to a value suitable for ORing into DNS message flags.
func
dns.opcode.to_text(value:Opcode) -> strConvert an opcode to text.
class
dns.query.BadResponseA DNS query response does not respond to the question asked.
class
dns.query.HTTPVersionWhich version of HTTP should be used?
class
dns.query.UDPModeHow should UDP be used in an IXFR from :py:func:`inbound_xfr()`?
class
dns.query.UnexpectedSourceA DNS query response came from an unexpected address or port.
func
dns.query.make_socket(af:socket.AddressFamily | int, type:socket.SocketKind, source:Any | None=None) -> socket.socketMake a socket using the module's ``socket_factory``.
func
dns.query.send_tcp(sock:Any, what:dns.message.Message | bytes, expiration:float | None=None) -> tuple[int, float]Send a DNS message to the specified TCP socket.
func
dns.query.send_udp(sock:Any, what:dns.message.Message | bytes, destination:Any, expiration:float | None=None) -> tuple[int, float]Send a DNS message to the specified UDP socket.
class
dns.rcode.UnknownRcodeA DNS rcode is unknown.
func
dns.rcode.from_flags(flags:int, ednsflags:int) -> RcodeReturn the rcode value encoded by flags and ednsflags.
func
dns.rcode.from_text(text:str) -> RcodeConvert text into an rcode.
func
dns.rcode.to_flags(value:Rcode) -> tuple[int, int]Return a ``(flags, ednsflags)`` tuple which encodes the rcode.
func
dns.rcode.to_text(value:Rcode, tsig:bool=False) -> strConvert rcode into text.
class
dns.rdata.RdataBase class for all DNS rdata types.
method
dns.rdata.Rdata.covers() -> dns.rdatatype.RdataTypeReturn the type a Rdata covers.
method
dns.rdata.Rdata.replace(**kwargs:Any) -> 'Rdata'Create a new Rdata instance based on the instance replace was invoked on.
method
dns.rdata.Rdata.to_digestable(origin:dns.name.Name | None=None) -> bytesConvert rdata to a format suitable for digesting in hashes.
method
dns.rdata.Rdata.to_styled_text(style:RdataStyle) -> strConvert an rdata to styled text format.
method
dns.rdata.Rdata.to_text(origin:dns.name.Name | None=None, relativize:bool=True, style:RdataStyle | None=None, **kw:Any) -> strConvert an rdata to text format.
method
dns.rdata.Rdata.to_wire(file:Any | None=None, compress:dns.name.CompressType | None=None, origin:dns.name.Name | None=None, canonicalize:bool=False) -> bytes | NoneConvert an rdata to wire format.
class
dns.rdata.RdatatypeExistsDNS rdatatype already exists.
class
dns.rdataclass.RdataClassDNS Rdata Class
class
dns.rdataclass.UnknownRdataclassA DNS class is unknown.
func
dns.rdataclass.from_text(text:str) -> RdataClassConvert text into a DNS rdata class value.
func
dns.rdataclass.is_metaclass(rdclass:RdataClass) -> boolTrue if the specified class is a metaclass.
func
dns.rdataclass.to_text(value:RdataClass) -> strConvert a DNS rdata class value to text.
class
dns.rdataset.ImmutableRdatasetAn immutable DNS rdataset.
class
dns.rdataset.RdatasetA DNS rdataset.
method
dns.rdataset.Rdataset.add(rd:dns.rdata.Rdata, ttl:int | None=None) -> NoneAdd the specified rdata to the rdataset.
method
dns.rdataset.Rdataset.to_styled_text(style:RdatasetStyle, name:dns.name.Name | None=None) -> strConvert the rdataset into styled text format.
method
dns.rdataset.Rdataset.update(other)Add all rdatas in other to self.
method
dns.rdataset.Rdataset.update_ttl(ttl:int) -> NonePerform TTL minimization.
class
dns.rdatatype.RdataTypeDNS Rdata Type
class
dns.rdatatype.UnknownRdatatypeDNS resource record type is unknown.
func
dns.rdatatype.from_text(text:str) -> RdataTypeConvert text into a DNS rdata type value.
func
dns.rdatatype.is_metatype(rdtype:RdataType) -> boolTrue if the specified type is a metatype.
func
dns.rdatatype.is_singleton(rdtype:RdataType) -> boolIs the specified type a singleton type?
func
dns.rdatatype.register_type(rdtype:RdataType, rdtype_text:str, is_singleton:bool=False) -> NoneDynamically register an rdatatype.
func
dns.rdatatype.to_text(value:RdataType) -> strConvert a DNS rdata type value to text.
class
dns.rdtypes.ANY.AFSDB.AFSDBAFSDB record
method
dns.rdtypes.ANY.AFSDB.AFSDB.hostname() -> dns.name.Namethe AFSDB hostname
method
dns.rdtypes.ANY.AFSDB.AFSDB.subtype() -> intthe AFSDB subtype
class
dns.rdtypes.ANY.AMTRELAY.AMTRELAYAMTRELAY record
class
dns.rdtypes.ANY.AVC.AVCAVC record
class
dns.rdtypes.ANY.BRID.BRIDBRID record See RFC 9886
class
dns.rdtypes.ANY.CAA.CAACAA (Certification Authority Authorization) record
class
dns.rdtypes.ANY.CDNSKEY.CDNSKEYCDNSKEY record
class
dns.rdtypes.ANY.CDS.CDSCDS record
class
dns.rdtypes.ANY.CERT.CERTCERT record
class
dns.rdtypes.ANY.CSYNC.CSYNCCSYNC record
class
dns.rdtypes.ANY.DLV.DLVDLV record
class
dns.rdtypes.ANY.DNAME.DNAMEDNAME record
class
dns.rdtypes.ANY.DNSKEY.DNSKEYDNSKEY record
class
dns.rdtypes.ANY.DS.DSDS record
class
dns.rdtypes.ANY.DSYNC.DSYNCDSYNC record
class
dns.rdtypes.ANY.DSYNC.SchemeDSYNC SCHEME
class
dns.rdtypes.ANY.DSYNC.UnknownSchemeUnknown DSYNC scheme
class
dns.rdtypes.ANY.EUI48.EUI48EUI48 record
class
dns.rdtypes.ANY.EUI64.EUI64EUI64 record
class
dns.rdtypes.ANY.GPOS.GPOSGPOS record
method
dns.rdtypes.ANY.GPOS.GPOS.float_altitude()altitude as a floating point value
method
dns.rdtypes.ANY.GPOS.GPOS.float_latitude()latitude as a floating point value
method
dns.rdtypes.ANY.GPOS.GPOS.float_longitude()longitude as a floating point value
class
dns.rdtypes.ANY.HHIT.HHITHHIT record See RFC 9886
class
dns.rdtypes.ANY.HINFO.HINFOHINFO record
class
dns.rdtypes.ANY.HIP.HIPHIP record
class
dns.rdtypes.ANY.ISDN.ISDNISDN record
class
dns.rdtypes.ANY.KEY.KEYKEY record
class
dns.rdtypes.ANY.L32.L32L32 record
class
dns.rdtypes.ANY.L64.L64L64 record
class
dns.rdtypes.ANY.LOC.LOCLOC record
method
dns.rdtypes.ANY.LOC.LOC.float_latitude()latitude as a floating point value
method
dns.rdtypes.ANY.LOC.LOC.float_longitude()longitude as a floating point value
class
dns.rdtypes.ANY.LP.LPLP record
class
dns.rdtypes.ANY.MX.MXMX record
class
dns.rdtypes.ANY.NID.NIDNID record
class
dns.rdtypes.ANY.NINFO.NINFONINFO record
class
dns.rdtypes.ANY.NS.NSNS record
class
dns.rdtypes.ANY.NSEC.NSECNSEC record
class
dns.rdtypes.ANY.NSEC3.NSEC3NSEC3 record
class
dns.rdtypes.ANY.NSEC3PARAM.NSEC3PARAMNSEC3PARAM record
class
dns.rdtypes.ANY.OPENPGPKEY.OPENPGPKEYOPENPGPKEY record
class
dns.rdtypes.ANY.OPT.OPTOPT record
method
dns.rdtypes.ANY.OPT.OPT.payload()payload size
class
dns.rdtypes.ANY.PTR.PTRPTR record
class
dns.rdtypes.ANY.RESINFO.RESINFORESINFO record
class
dns.rdtypes.ANY.RP.RPRP record
class
dns.rdtypes.ANY.RRSIG.RRSIGRRSIG record
class
dns.rdtypes.ANY.RT.RTRT record
class
dns.rdtypes.ANY.SIG.SIGSIG record
class
dns.rdtypes.ANY.SMIMEA.SMIMEASMIMEA record
class
dns.rdtypes.ANY.SOA.SOASOA record
class
dns.rdtypes.ANY.SPF.SPFSPF record
class
dns.rdtypes.ANY.SSHFP.SSHFPSSHFP record
class
dns.rdtypes.ANY.TKEY.TKEYTKEY Record
class
dns.rdtypes.ANY.TLSA.TLSATLSA record
class
dns.rdtypes.ANY.TSIG.TSIGTSIG record
class
dns.rdtypes.ANY.TXT.TXTTXT record
class
dns.rdtypes.ANY.URI.URIURI record
class
dns.rdtypes.ANY.WALLET.WALLETWALLET record
class
dns.rdtypes.ANY.X25.X25X25 record
class
dns.rdtypes.ANY.ZONEMD.ZONEMDZONEMD record
class
dns.rdtypes.CH.A.AA record for Chaosnet
class
dns.rdtypes.IN.A.AA record.
class
dns.rdtypes.IN.AAAA.AAAAAAAA record.
class
dns.rdtypes.IN.APL.APLAPL record.
class
dns.rdtypes.IN.APL.APLItemAn APL list item.
class
dns.rdtypes.IN.DHCID.DHCIDDHCID record
class
dns.rdtypes.IN.HTTPS.HTTPSHTTPS record
class
dns.rdtypes.IN.IPSECKEY.IPSECKEYIPSECKEY record
class
dns.rdtypes.IN.KX.KXKX record
class
dns.rdtypes.IN.NAPTR.NAPTRNAPTR record
class
dns.rdtypes.IN.NSAP.NSAPNSAP record.
class
dns.rdtypes.IN.NSAP_PTR.NSAP_PTRNSAP-PTR record
class
dns.rdtypes.IN.PX.PXPX record.
class
dns.rdtypes.IN.SRV.SRVSRV record
class
dns.rdtypes.IN.SVCB.SVCBSVCB record
class
dns.rdtypes.IN.WKS.WKSWKS record
class
dns.rdtypes.dnskeybase.DNSKEYBaseBase class for rdata that is like a DNSKEY record
method
dns.rdtypes.dnskeybase.DNSKEYBase.key_id() -> intReturn the key id (a 16-bit number) for the specified key.
class
dns.rdtypes.dsbase.DSBaseBase class for rdata that is like a DS record
class
dns.rdtypes.euibase.EUIBaseEUIxx record
class
dns.rdtypes.mxbase.MXBaseBase class for rdata that is like an MX record.
class
dns.rdtypes.nsbase.NSBaseBase class for rdata that is like an NS record.
class
dns.rdtypes.rrsigbase.BadSigTimeTime in DNS SIG or RRSIG resource record cannot be parsed.
class
dns.rdtypes.rrsigbase.RRSIGBaseBase class for rdata that is like a RRSIG record
class
dns.rdtypes.svcbbase.ALPNParamThe alpn parameter.
class
dns.rdtypes.svcbbase.DoCPathParamThe docpath parameter.
class
dns.rdtypes.svcbbase.GenericParamGeneric SVCB parameter
class
dns.rdtypes.svcbbase.ParamAbstract base class for SVCB parameters
class
dns.rdtypes.svcbbase.ParamKeySVCB ParamKey
class
dns.rdtypes.svcbbase.SVCBBaseBase class for SVCB-like records
class
dns.rdtypes.svcbbase.UnknownParamKeyUnknown SVCB ParamKey
class
dns.rdtypes.tlsabase.TLSABaseBase class for TLSA and SMIMEA records
class
dns.rdtypes.txtbase.TXTBaseBase class for rdata that is like a TXT record (see RFC 1035).
class
dns.rdtypes.util.BitmapA helper class for the NSEC/NSEC3/CSYNC type bitmaps
class
dns.renderer.RendererHelper class for building DNS wire-format messages.
method
dns.renderer.Renderer.add_question(qname, rdtype, rdclass=dns.rdataclass.IN)Add a question to the message.
method
dns.renderer.Renderer.get_wire()Return the wire format message.
method
dns.renderer.Renderer.release_reserved() -> NoneRelease the reserved bytes.
method
dns.renderer.Renderer.reserve(size:int) -> NoneReserve *size* bytes.
method
dns.renderer.Renderer.write_header()Write the DNS message header.
class
dns.resolver.AnswerDNS stub resolver answer.
class
dns.resolver.AnswersA dict of DNS stub resolver answers, indexed by type.
class
dns.resolver.BaseResolverDNS stub resolver.
method
dns.resolver.BaseResolver.read_registry() -> NoneExtract resolver configuration from the Windows registry.
method
dns.resolver.BaseResolver.read_resolv_conf(f:Any) -> NoneProcess *f* as a file in the /etc/resolv.conf format.
method
dns.resolver.BaseResolver.reset() -> NoneReset all resolver configuration to the defaults.
method
dns.resolver.BaseResolver.set_flags(flags:int) -> NoneOverride the default query flags.
method
dns.resolver.BaseResolver.use_edns(edns:int | bool | None=0, ednsflags:int=0, payload:int=dns.message.DEFAULT_EDNS_PAYLOAD, options:list[dns.edns.Option] | None=None) -> NoneConfigure EDNS behavior.
method
dns.resolver.BaseResolver.use_tsig(keyring:Any, keyname:dns.name.Name | str | None=None, algorithm:dns.name.Name | str=dns.tsig.default_algorithm) -> NoneAdd a TSIG signature to each query.
class
dns.resolver.CacheSimple thread-safe DNS answer cache.
method
dns.resolver.Cache.flush(key:CacheKey | None=None) -> NoneFlush the cache.
method
dns.resolver.Cache.get(key:CacheKey) -> Answer | NoneGet the answer associated with *key*, or ``None`` if not cached.
method
dns.resolver.Cache.put(key:CacheKey, value:Answer) -> NoneAssociate *key* with *value* in the cache.
class
dns.resolver.CacheStatisticsCache Statistics
class
dns.resolver.EmptyHostAnswersThe HostAnswers has no addresses
class
dns.resolver.LRUCacheThread-safe, bounded, least-recently-used DNS answer cache.
method
dns.resolver.LRUCache.flush(key:CacheKey | None=None) -> NoneFlush the cache.
method
dns.resolver.LRUCache.get(key:CacheKey) -> Answer | NoneGet the answer associated with *key*.
method
dns.resolver.LRUCache.get_hits_for_key(key:CacheKey) -> intReturn the number of cache hits associated with the specified key.
method
dns.resolver.LRUCache.put(key:CacheKey, value:Answer) -> NoneAssociate key and value in the cache.
class
dns.resolver.LRUCacheNodeLRUCache node.
class
dns.resolver.LifetimeTimeoutThe resolution lifetime expired.
class
dns.resolver.NXDOMAINThe DNS query name does not exist.
method
dns.resolver.NXDOMAIN.canonical_name()Return the unresolved canonical name.
method
dns.resolver.NXDOMAIN.qnames()All of the names that were tried.
method
dns.resolver.NXDOMAIN.response(qname)The response for query *qname*.
class
dns.resolver.NoAnswerThe DNS response does not contain an answer to the question.
class
dns.resolver.NoMetaqueriesDNS metaqueries are not allowed.
class
dns.resolver.NoNameserversAll nameservers failed to answer the query.
class
dns.resolver.NoRootSOAThere is no SOA RR at the DNS root name.
class
dns.resolver.ResolverDNS stub resolver.
method
dns.resolver.Resolver.canonical_name(name:dns.name.Name | str) -> dns.name.NameDetermine the canonical name of *name*.
method
dns.resolver.Resolver.resolve_address(ipaddr:str, *args:Any, **kwargs:Any) -> AnswerUse a resolver to run a reverse query for PTR records.
method
dns.resolver.Resolver.resolve_name(name:dns.name.Name | str, family:int=socket.AF_UNSPEC, **kwargs:Any) -> HostAnswersUse a resolver to query for address records.
class
dns.resolver.YXDOMAINThe DNS query name is too long after DNAME substitution.
func
dns.resolver.canonical_name(name:dns.name.Name | str) -> dns.name.NameDetermine the canonical name of *name*.
func
dns.resolver.get_default_resolver() -> ResolverGet the default resolver, initializing it if necessary.
func
dns.resolver.reset_default_resolver() -> NoneRe-initialize default resolver.
func
dns.resolver.resolve_address(ipaddr:str, *args:Any, **kwargs:Any) -> AnswerUse a resolver to run a reverse query for PTR records.
func
dns.resolver.resolve_name(name:dns.name.Name | str, family:int=socket.AF_UNSPEC, **kwargs:Any) -> HostAnswersUse a resolver to query for address records.
func
dns.resolver.restore_system_resolver() -> NoneUndo the effects of prior override_system_resolver().
class
dns.rrset.RRsetA DNS RRset (named rdataset).
method
dns.rrset.RRset.match(*args:Any, **kwargs:Any) -> boolDoes this rrset match the specified attributes?
method
dns.rrset.RRset.to_rdataset() -> dns.rdataset.RdatasetConvert an RRset into an Rdataset.
method
dns.rrset.RRset.to_styled_text(style:dns.rdataset.RdatasetStyle) -> strConvert the RRset to styled text.
method
dns.rrset.RRset.to_text(origin:dns.name.Name | None=None, relativize:bool=True, want_comments:bool=False, style:dns.rdataset.RdatasetStyle | None=None, **kw:Any) -> strConvert the RRset into DNS zone file format.
method
dns.rrset.RRset.to_wire(file:Any, compress:dns.name.CompressType | None=None, origin:dns.name.Name | None=None, **kw:Any) -> intConvert the RRset to wire format.
class
dns.set.SetA simple set class.
method
dns.set.Set.add(item)Add an item to the set.
method
dns.set.Set.clear()Make the set empty.
method
dns.set.Set.copy()Make a (shallow) copy of the set.
method
dns.set.Set.discard(item)Remove an item from the set if present.
method
dns.set.Set.issubset(other)Is this set a subset of *other*?
method
dns.set.Set.issuperset(other)Is this set a superset of *other*?
method
dns.set.Set.pop()Remove an arbitrary item from the set.
method
dns.set.Set.remove(item)Remove an item from the set.
class
dns.style.BaseStyleAll text styles
class
dns.tokenizer.TokenA DNS zone file format token.
class
dns.tokenizer.TokenizerA DNS zone file format tokenizer.
method
dns.tokenizer.Tokenizer.as_identifier(token:Token) -> strTry to interpret the token as an identifier.
method
dns.tokenizer.Tokenizer.as_int(token:Token, base:int=10) -> intTry to interpret the token as an unsigned integer.
method
dns.tokenizer.Tokenizer.as_name(token:Token, origin:dns.name.Name | None=None, relativize:bool=False, relativize_to:dns.name.Name | None=None) -> dns.name.NameTry to interpret the token as a DNS name.
method
dns.tokenizer.Tokenizer.as_string(token:Token, max_length:int | None=None) -> strTry to interpret the token as a string.
method
dns.tokenizer.Tokenizer.as_uint16(token:Token, base:int=10) -> intTry to interpret the token as an unsigned 16-bit integer.
method
dns.tokenizer.Tokenizer.as_uint32(token:Token, base:int=10) -> intTry to interpret the token as an unsigned 32-bit integer.
method
dns.tokenizer.Tokenizer.as_uint48(token:Token, base:int=10) -> intTry to interpret the token as an unsigned 48-bit integer.
method
dns.tokenizer.Tokenizer.as_uint8(token:Token) -> intTry to interpret the token as an unsigned 8-bit integer.
method
dns.tokenizer.Tokenizer.concatenate_remaining_identifiers(allow_empty:bool=False) -> strRead the remaining tokens on the line, which should be identifiers.
method
dns.tokenizer.Tokenizer.get(want_leading:bool=False, want_comment:bool=False) -> TokenGet the next token.
method
dns.tokenizer.Tokenizer.get_identifier() -> strRead the next token, which should be an identifier.
method
dns.tokenizer.Tokenizer.get_int(base:int=10) -> intRead the next token and interpret it as an unsigned integer.
method
dns.tokenizer.Tokenizer.get_name(origin:dns.name.Name | None=None, relativize:bool=False, relativize_to:dns.name.Name | None=None) -> dns.name.NameRead the next token and interpret it as a DNS name.
method
dns.tokenizer.Tokenizer.get_remaining(max_tokens:int | None=None) -> list[Token]Return the remaining tokens on the line, until an EOL or EOF is seen.
method
dns.tokenizer.Tokenizer.get_string(max_length:int | None=None) -> strRead the next token and interpret it as a string.
method
dns.tokenizer.Tokenizer.get_ttl() -> intRead the next token and interpret it as a DNS TTL.
method
dns.tokenizer.Tokenizer.get_uint16(base:int=10) -> intRead the next token and interpret it as a 16-bit unsigned integer.
method
dns.tokenizer.Tokenizer.get_uint32(base:int=10) -> intRead the next token and interpret it as a 32-bit unsigned integer.
method
dns.tokenizer.Tokenizer.get_uint48(base:int=10) -> intRead the next token and interpret it as a 48-bit unsigned integer.
method
dns.tokenizer.Tokenizer.get_uint8() -> intRead the next token and interpret it as an 8-bit unsigned integer.
method
dns.tokenizer.Tokenizer.next()Return the next item in an iteration.
method
dns.tokenizer.Tokenizer.skip_whitespace() -> intConsume input until a non-whitespace character is encountered.
method
dns.tokenizer.Tokenizer.unget(token:Token) -> NoneUnget a token.
method
dns.tokenizer.Tokenizer.where() -> tuple[str, int]Return the current location in the input.
class
dns.transaction.AlreadyEndedTried to use an already-ended transaction.
class
dns.transaction.ReadOnlyTried to write to a read-only transaction.
method
dns.transaction.Transaction.add(*args:Any) -> NoneAdd records.
method
dns.transaction.Transaction.changed() -> boolHas this transaction changed anything?
method
dns.transaction.Transaction.check_delete_name(check:CheckDeleteNameType) -> NoneCall *check* before putting (storing) an rdataset.
method
dns.transaction.Transaction.check_delete_rdataset(check:CheckDeleteRdatasetType) -> NoneCall *check* before deleting an rdataset.
method
dns.transaction.Transaction.check_put_rdataset(check:CheckPutRdatasetType) -> NoneCall *check* before putting (storing) an rdataset.
method
dns.transaction.Transaction.commit() -> NoneCommit the transaction.
method
dns.transaction.Transaction.delete(*args:Any) -> NoneDelete records.
この情報について
掲載しているシグネチャは rthalley/dnspython の公開ソースコードを
Python の ast モジュールで静的解析し、引数名・デフォルト値・
型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。
詳しくは仕組みの解説をご覧ください。