pysasl.prep Package

pysasl.prep.Preparation

Any callable that prepares a string value to improve the likelihood that comparisons behave in an expected manner.

See also

RFC 4422 5.

alias of Callable[[str], str]

pysasl.prep.noprep(source)[source]

Returns source unmodified.

Parameters:

source (str) –

Return type:

str

pysasl.prep.saslprep(source, *, allow_unassigned=False)[source]

The SASLprep algorithm defined by RFC 4013.

Parameters:
  • source (str) – The string to prepare.

  • allow_unassigned (bool) – Allow unassigned code points in the result string, Per RFC 3454 7., this should only be used “queries” and never stored strings.

Return type:

str