1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
3 NAMEBASE= python-python-slugify
7 SDESC[v11]= Unicode-capable slug generator (3.11)
8 SDESC[v12]= Unicode-capable slug generator (3.12)
9 HOMEPAGE= https://github.com/un33k/python-slugify
10 CONTACT= Python_Automaton[python@ironwolf.systems]
13 SITES[main]= PYPIWHL/f3/00/d1f681edfd12ba85259932ed08840dc672676e99ffdc8ff34911a8a5f477
14 DISTFILE[1]= python_slugify-8.0.3-py2.py3-none-any.whl:main
19 OPTIONS_AVAILABLE= PY311 PY312
20 OPTIONS_STANDARD= none
21 VOPTS[v11]= PY311=ON PY312=OFF
22 VOPTS[v12]= PY311=OFF PY312=ON
24 DISTNAME= python_slugify-8.0.3.dist-info
28 [PY311].RUN_DEPENDS_ON= python-text-unidecode:single:v11
29 [PY311].USES_ON= python:v11,wheel
31 [PY312].RUN_DEPENDS_ON= python-text-unidecode:single:v12
32 [PY312].USES_ON= python:v12,wheel
34 [FILE:2863:descriptions/desc.single]
37 **A Python slugify application that handles unicode**.
39 [![status-image]][status-link]
40 [![version-image]][version-link]
41 [![coverage-image]][coverage-link]
45 **Best attempt** to create slugs from unicode strings while keeping it
50 This module, by default installs and uses [text-unidecode] _(GPL & Perl
51 Artistic)_ for its decoding needs.
53 However, there is an alternative decoding package called [Unidecode]
54 _(GPL)_. It can be installed as `python-slugify[unidecode]` for those who
55 prefer it. `Unidecode` is believed to be more [advanced].
57 ### `Official` Support Matrix
60 | -------------- | ------------------ |
61 | `>= 2.7 < 3.6` | `< 5.0.0` |
62 | `>= 3.6 < 3.7` | `>= 5.0.0 < 7.0.0` |
63 | `>= 3.7` | `>= 7.0.0` |
67 easy_install python-slugify |OR| easy_install python-slugify[unidecode]
69 pip install python-slugify |OR| pip install python-slugify[unidecode]
76 entities: bool = True,
78 hexadecimal: bool = True,
80 word_boundary: bool = False,
81 separator: str = DEFAULT_SEPARATOR,
82 save_order: bool = False,
83 stopwords: Iterable[str] = (),
84 regex_pattern: str | None = None,
85 lowercase: bool = True,
86 replacements: Iterable[Iterable[str]] = (),
87 allow_unicode: bool = False,
90 Make a slug from the given text.
91 :param text (str): initial text
92 :param entities (bool): converts html entities to unicode (foo & bar
94 :param decimal (bool): converts html decimal to unicode (Ž -> Ž ->
96 :param hexadecimal (bool): converts html hexadecimal to unicode (Ž
98 :param max_length (int): output string length
99 :param word_boundary (bool): truncates to end of full words (length may
100 be shorter than max_length)
101 :param save_order (bool): if parameter is True and max_length > 0 return
102 whole words in the initial order
103 :param separator (str): separator between words
104 :param stopwords (iterable): words to discount
105 :param regex_pattern (str): regex pattern for disallowed characters
106 :param lowercase (bool): activate case sensitivity by setting it to False
107 :param replacements (iterable): list of replacement rules e.g. [['|',
108 'or'], ['%', 'percent']]
109 :param allow_unicode (bool): allow unicode characters
110 :return (str): slugify text
117 from slugify import slugify
119 txt = "This is a test ---"
121 self.assertEqual(r, "this-is-a-test")
125 self.assertEqual(r, "ying-shi-ma")
128 r = slugify(txt, allow_unicode=True)
129 self.assertEqual(r, "影師嗎")
131 txt = 'C\'est déjà l\'été.'
133 self.assertEqual(r, "c-est-deja-l-ete")
138 c71189c161e8c671f1b141034d9a56308a8a5978cd13d40446c879569212fdd1 10055 python_slugify-8.0.3-py2.py3-none-any.whl