pyxmpp.xmppstringprep

Package pyxmpp :: Module xmppstringprep |
[hide private]

# Module xmppstringprep

source code

Nodeprep and resourceprep stringprep profiles.

Normative reference:
  - RFC 3920

Classes | [hide private]
| LookupFunction Class for looking up RFC 3454 tables using function.
| LookupTable Class for looking up RFC 3454 tables using a dictionary and/or list of ranges.
| Profile Base class for stringprep profiles.

Functions | [hide private]
b1_mapping(uc) Do RFC 3454 B.1 table mapping. | source code
nfkc(data) Do NFKC normalization of Unicode data. | source code
set_stringprep_cache_size(size) Modify stringprep cache size. | source code

Variables | [hide private]
| A_1 = `LookupFunction(stringprep.in_table_a1)`
| B_1 = `<pyxmpp.xmppstringprep.LookupFunction instance at 0x85af`...``
| B_2 = `LookupFunction(stringprep.map_table_b2)`
| B_3 = `LookupFunction(stringprep.map_table_b3)`
| C_1_1 = `LookupFunction(stringprep.in_table_c11)`
| C_1_2 = `LookupFunction(stringprep.in_table_c12)`
| C_2_1 = `LookupFunction(stringprep.in_table_c21)`
| C_2_2 = `LookupFunction(stringprep.in_table_c22)`
| C_3 = `LookupFunction(stringprep.in_table_c3)`
| C_4 = `LookupFunction(stringprep.in_table_c4)`
| C_5 = `LookupFunction(stringprep.in_table_c5)`
| C_6 = `LookupFunction(stringprep.in_table_c6)`
| C_7 = `LookupFunction(stringprep.in_table_c7)`
| C_8 = `LookupFunction(stringprep.in_table_c8)`
| C_9 = `LookupFunction(stringprep.in_table_c9)`
| D_1 = `LookupFunction(stringprep.in_table_d1)`
| D_2 = `LookupFunction(stringprep.in_table_d2)`
| nodeprep = `Profile(unassigned= (A_1,), mapping= (B_1, B_2), no`...``
| resourceprep = `Profile(unassigned= (A_1,), mapping= (B_1,), no`...``
| stringprep_cache_size = `1000`
| __package__ = ``'``pyxmpp``'``

Imports: stringprep, unicodedata, StringprepError

Function Details | [hide private]

### b1_mapping(uc) | source code
Do RFC 3454 B.1 table mapping. Parameters: `uc` - : Unicode character to map. Returns: u"" if there is `uc` code in the table, `None` otherwise.

### nfkc(data) | source code
Do NFKC normalization of Unicode data. Parameters: `data` - : list of Unicode characters or Unicode string. Returns: normalized Unicode string.

### set_stringprep_cache_size(size) | source code
Modify stringprep cache size. Parameters: `size` - : new cache size

Variables Details | [hide private]

  ### B_1 Value:
      <pyxmpp.xmppstringprep.LookupFunction instance at 0x85afe4c>

  ### nodeprep Value:
      Profile(unassigned= (A_1,), mapping= (B_1, B_2), normalization= nfkc,
      prohibited= (C_1_1, C_1_2, C_2_1, C_2_2, C_3, C_4, C_5, C_6, C_7, C_8,
       C_9, LookupTable({u'"': True, u'&': True, u"'": True, u"/": True, u":
      ": True, u"<": True, u">": True, u"@": True}, ())), bidi= 1)

  ### resourceprep Value:
      Profile(unassigned= (A_1,), mapping= (B_1,), normalization= nfkc, proh
      ibited= (C_1_2, C_2_1, C_2_2, C_3, C_4, C_5, C_6, C_7, C_8, C_9), bidi
      = 1)