idnkit-python
2.3
|
The idnkit module supports various manipulations of internationalized domain names using idnkit. More...
Classes | |
class | IDNA2008 |
An instance of IDNA2008 class represents IDNA2008 version of IDNA conversion context. More... | |
class | Error |
Exception for the idnkit module. More... | |
Functions | |
def | create |
Creates an instance of IDNA conversion context with version 'idna_version'. More... | |
Variables | |
int | ENCODE_REGIST = -1 |
Action value to encode a domain name with the domain name registration protocol. More... | |
int | ENCODE_LOOKUP = -2 |
Action value to encode a domain name with the domain name lookup protocol. More... | |
int | DECODE_REGIST = -3 |
Action value to decode a domain name with the domain name registration protocol. More... | |
int | DECODE_LOOKUP = -4 |
Action value to decode a domain name with the domain name lookup protocol. More... | |
int | COMPARE_REGIST = -1 |
Action value to compare two domain names with the domain name registration protocol. More... | |
int | COMPARE_LOOKUP = -2 |
Action value to compare two domain names with the domain name lookup protocol. More... | |
int | CHECK_REGIST = -1 |
Action value to validate a domain name with the domain name registration protocol. More... | |
int | CHECK_LOOKUP = -2 |
Action value to validate a domain name with the domain name lookup protocol. More... | |
int | SUCCESS = 0 |
Error code of idnkit library 'idn_success'. More... | |
int | NOT_FOUND = 1 |
Error code of idnkit library 'idn_not_found'. More... | |
int | INVALID_ENCODING = 2 |
Error code of idnkit library 'idn_invalid_encoding'. More... | |
int | INVALID_SYNTAX = 3 |
Error code of idnkit library 'idn_invalid_syntax'. More... | |
int | INVALID_NAME = 4 |
Error code of idnkit library 'idn_invalid_name'. More... | |
int | INVALID_MESSAGE = 5 |
Error code of idnkit library 'idn_invalid_message'. More... | |
int | INVALID_ACTION = 6 |
Error code of idnkit library 'idn_invalid_action'. More... | |
int | INVALID_CODE_POINT = 7 |
Error code of idnkit library 'idn_invalid_codepoint'. More... | |
int | BUFFER_OVERFLOW = 8 |
Error code of idnkit library 'idn_buffer_overflow'. More... | |
int | NO_ENTRY = 9 |
Error code of idnkit library 'idn_noentry'. More... | |
int | NO_MEMORY = 10 |
Error code of idnkit library 'idn_nomemory'. More... | |
int | NO_FILE = 11 |
Error code of idnkit library 'idn_nofile'. More... | |
int | NO_MAPPING = 12 |
Error code of idnkit library 'idn_mapping'. More... | |
int | CONTEXT_REQUIRED = 13 |
Error code of idnkit library 'idn_context_required'. More... | |
int | PROHCHECK_ERROR = 14 |
Error code of idnkit library 'idn_prohcheck_error'. More... | |
int | UNASCHECK_ERROR = 15 |
Error code of idnkit library 'idn_unascheck_error'. More... | |
int | NFCCHECK_ERROR = 16 |
Error code of idnkit library 'idn_nfccheck_error'. More... | |
int | PREFCHECK_ERROR = 17 |
Error code of idnkit library 'idn_prefcheck_error'. More... | |
int | HYPHCHECK_ERROR = 18 |
Error code of idnkit library 'idn_hyphcheck_error'. More... | |
int | COMBCHECK_ERROR = 19 |
Error code of idnkit library 'idn_combcheck_error'. More... | |
int | CTXJCHECK_ERROR = 20 |
Error code of idnkit library 'idn_ctxjcheck_error'. More... | |
int | CTXOCHECK_ERROR = 21 |
Error code of idnkit library 'idn_ctxocheck_error'. More... | |
int | BIDICHECK_ERROR = 22 |
Error code of idnkit library 'idn_bidicheck_error'. More... | |
int | LOCALCHECK_ERROR = 23 |
Error code of idnkit library 'idn_localcheck_error'. More... | |
int | LENCHECK_ERROR = 24 |
Error code of idnkit library 'idn_lencheck_error'. More... | |
int | RTCHECK_ERROR = 25 |
Error code of idnkit library 'idn_rtcheck_error'. More... | |
int | TR46CHECK_ERROR = 26 |
Error code of idnkit library 'idn_tr46check_error'. More... | |
int | NEQ = 27 |
Error code of idnkit library 'idn_neq'. More... | |
int | FAILURE = 28 |
Error code of idnkit library 'idn_failure'. More... | |
The idnkit module supports various manipulations of internationalized domain names using idnkit.
The module provides easy-to-use, high-level interface to help applications operate internationalized domain names. They are designed according to IDNA framework where each application must encode internationalized domain names before passing them to the resolver. Currently, the module supports idnkit version 2, which supports IDNA2008.
To use this module, idnkit binary (at least libidnkitlite shared library) is required.
Please note that the module supports UTF-8 only. Local encodings (e.g. ISO8859-1) are not supported. That is to say, domain names passed to methods in this module must be written in UTF-8 and domain names returned from the methods are always UTF-8.
def idnkit.create | ( | idna_version = 'IDNA2008' | ) |
Creates an instance of IDNA conversion context with version 'idna_version'.
Currently, only 'IDNA2008' is recognized as 'idna_version'.
The method returns an instance of IDNA2008 class if 'idna_version' is 'IDNA2008'.
idna_version | Version of an instance to be created. |
idnkit.Error | Initialization failed. |
int idnkit.BIDICHECK_ERROR = 22 |
Error code of idnkit library 'idn_bidicheck_error'.
int idnkit.BUFFER_OVERFLOW = 8 |
Error code of idnkit library 'idn_buffer_overflow'.
int idnkit.CHECK_LOOKUP = -2 |
Action value to validate a domain name with the domain name lookup protocol.
Also local-check is performed if the conversion context has code point set.
int idnkit.CHECK_REGIST = -1 |
Action value to validate a domain name with the domain name registration protocol.
Also local-check is performed if the conversion context has code point set.
int idnkit.COMBCHECK_ERROR = 19 |
Error code of idnkit library 'idn_combcheck_error'.
int idnkit.COMPARE_LOOKUP = -2 |
Action value to compare two domain names with the domain name lookup protocol.
Also local-check is performed if the conversion context has code point set.
int idnkit.COMPARE_REGIST = -1 |
Action value to compare two domain names with the domain name registration protocol.
Also local-check is performed if the conversion context has code point set.
int idnkit.CONTEXT_REQUIRED = 13 |
Error code of idnkit library 'idn_context_required'.
int idnkit.CTXJCHECK_ERROR = 20 |
Error code of idnkit library 'idn_ctxjcheck_error'.
int idnkit.CTXOCHECK_ERROR = 21 |
Error code of idnkit library 'idn_ctxocheck_error'.
int idnkit.DECODE_LOOKUP = -4 |
Action value to decode a domain name with the domain name lookup protocol.
Also local-check is performed if the conversion context has code point set.
int idnkit.DECODE_REGIST = -3 |
Action value to decode a domain name with the domain name registration protocol.
Also local-check is performed if the conversion context has code point set.
int idnkit.ENCODE_LOOKUP = -2 |
Action value to encode a domain name with the domain name lookup protocol.
Also local-check is performed if the conversion context has code point set.
int idnkit.ENCODE_REGIST = -1 |
Action value to encode a domain name with the domain name registration protocol.
Also local-check is performed if the conversion context has code point set.
int idnkit.FAILURE = 28 |
Error code of idnkit library 'idn_failure'.
int idnkit.HYPHCHECK_ERROR = 18 |
Error code of idnkit library 'idn_hyphcheck_error'.
int idnkit.INVALID_ACTION = 6 |
Error code of idnkit library 'idn_invalid_action'.
int idnkit.INVALID_CODE_POINT = 7 |
Error code of idnkit library 'idn_invalid_codepoint'.
int idnkit.INVALID_ENCODING = 2 |
Error code of idnkit library 'idn_invalid_encoding'.
int idnkit.INVALID_MESSAGE = 5 |
Error code of idnkit library 'idn_invalid_message'.
int idnkit.INVALID_NAME = 4 |
Error code of idnkit library 'idn_invalid_name'.
int idnkit.INVALID_SYNTAX = 3 |
Error code of idnkit library 'idn_invalid_syntax'.
int idnkit.LENCHECK_ERROR = 24 |
Error code of idnkit library 'idn_lencheck_error'.
int idnkit.LOCALCHECK_ERROR = 23 |
Error code of idnkit library 'idn_localcheck_error'.
int idnkit.NEQ = 27 |
Error code of idnkit library 'idn_neq'.
int idnkit.NFCCHECK_ERROR = 16 |
Error code of idnkit library 'idn_nfccheck_error'.
int idnkit.NO_ENTRY = 9 |
Error code of idnkit library 'idn_noentry'.
int idnkit.NO_FILE = 11 |
Error code of idnkit library 'idn_nofile'.
int idnkit.NO_MAPPING = 12 |
Error code of idnkit library 'idn_mapping'.
int idnkit.NO_MEMORY = 10 |
Error code of idnkit library 'idn_nomemory'.
int idnkit.NOT_FOUND = 1 |
Error code of idnkit library 'idn_not_found'.
int idnkit.PREFCHECK_ERROR = 17 |
Error code of idnkit library 'idn_prefcheck_error'.
int idnkit.PROHCHECK_ERROR = 14 |
Error code of idnkit library 'idn_prohcheck_error'.
int idnkit.RTCHECK_ERROR = 25 |
Error code of idnkit library 'idn_rtcheck_error'.
int idnkit.SUCCESS = 0 |
Error code of idnkit library 'idn_success'.
int idnkit.TR46CHECK_ERROR = 26 |
Error code of idnkit library 'idn_tr46check_error'.
int idnkit.UNASCHECK_ERROR = 15 |
Error code of idnkit library 'idn_unascheck_error'.