{"id":21180,"library":"domain2idna","title":"domain2idna","description":"A Python tool to convert domains (or files containing domain lists) to IDNA (Punycode) format. Current version 1.12.4 supports Python >=3.6.2, <4.0. Release cadence is irregular with maintenance updates.","status":"active","version":"1.12.4","language":"python","source_language":"en","source_url":"https://github.com/PyFunceble/domain2idna","tags":["idna","punycode","domain","conversion","dns"],"install":[{"cmd":"pip install domain2idna","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"The primary function for domain conversion.","symbol":"convert","correct":"from domain2idna import convert"},{"note":"The 'get' function was deprecated in v1.10.1 and removed in later versions. Use 'convert' instead.","wrong":"from domain2idna import get","symbol":"get","correct":"from domain2idna import convert"}],"quickstart":{"code":"from domain2idna import convert\n\nresult = convert('münchen.de')\nprint(result)  # Output: xn--mnchen-3ya.de","lang":"python","description":"Convert a single domain with non-ASCII characters to IDNA (Punycode) format."},"warnings":[{"fix":"Replace 'get()' with 'convert()'.","message":"The 'get' function was deprecated in v1.10.1 and removed in later versions. Use 'convert' instead.","severity":"deprecated","affected_versions":">=1.10.1"},{"fix":"Be aware that certain strings (e.g., 'localhost', '0.0.0.0') are ignored and returned as-is.","message":"The library may return the input unchanged if it is already ASCII or contains common hostnames like 'localhost'. Check the documentation for ignored domains.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use 'from domain2idna import convert' and call 'convert()' instead.","cause":"The 'get' function was deprecated and removed in newer versions.","error":"AttributeError: module 'domain2idna' has no attribute 'get'"},{"fix":"Pass the domain as a string: convert('example.com')","cause":"The 'convert()' function requires a string argument representing the domain.","error":"TypeError: convert() missing 1 required positional argument: 'to_transform'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}