This document is for Kombu's development version, which can be significantly different from previous releases. Get the stable docs here: 5.0.

文本实用程序- kombu.utils.text

文本实用程序。

kombu.utils.text.escape_regex(p: str, white: str = '') str[源代码]

在正则表达式中使用的转义字符串。

kombu.utils.text.fmatch_best(needle: str, haystack: Iterable[str], min_ratio: float = 0.6) str | None[源代码]

模糊匹配-查找最佳匹配(标量)。

kombu.utils.text.fmatch_iter(needle: str, haystack: Iterable[str], min_ratio: float = 0.6) Iterator[tuple[float, str]][源代码]

模糊匹配:迭代匹配。

生成器:

Tuple ( of ratio and key. )

kombu.utils.text.version_string_as_tuple(s: str) version_info_t[源代码]

将版本字符串转换为版本信息元组。