name-helpers.rst 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. .. _name-helpers:
  2. Name Helpers
  3. ------------
  4. Sometimes you want to look up an address in the DNS instead of a name.
  5. Dnspython provides a helper functions for converting between addresses
  6. and their "reverse map" form in the DNS.
  7. For example:
  8. ========= =========================================================================
  9. Address DNS Reverse Name
  10. ========= =========================================================================
  11. 127.0.0.1 1.0.0.127.in-addr.arpa.
  12. ::1 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa.
  13. ========= =========================================================================
  14. |
  15. .. autofunction:: dns.reversename.from_address
  16. .. autofunction:: dns.reversename.to_address
  17. Dnspython also provides helpers for converting E.164 numbers (i.e.
  18. telephone numbers) into the names used for them in the DNS.
  19. For example:
  20. ================ ==================================
  21. Number DNS E.164 Name
  22. ================ ==================================
  23. +1.650.555.1212 2.1.2.1.5.5.5.0.5.6.1.e164.arpa.
  24. +44 20 7946 0123 3.2.1.0.6.4.9.7.0.2.4.4.e164.arpa.
  25. ================ ==================================
  26. |
  27. .. autofunction:: dns.e164.from_e164
  28. .. autofunction:: dns.e164.to_e164