Python Slugify
A Python slugify application that handles unicode.
Overview
Best attempt to create slugs from unicode strings while keeping it DRY.
Notice
This module, by default installs and uses text-unidecode (GPL & Perl Artistic) for its decoding needs.
However, there is an alternative decoding package called Unidecode (GPL). It can be installed as python-slugify[unidecode] for those who prefer it.
Python Versions & Official Support
Python 2.7 <-> python-slugify < 5.0.0
Python 3.6+ <-> python-slugify >= 5.0.0
Python 3.7+ <-> python-slugify >= 7.0.0
How to install
easy_install python-slugify |OR| easy_install python-slugify[unidecode]
-- OR --
pip install python-slugify |OR| pip install python-slugify[unidecode]
Options
def slugify(
text,
entities=True,
decimal=True,
hexadecimal=True,
max_length=0,
word_boundary=False,
separator=- ,
save_order=False,
stopwords=(),
regex_pattern=None,
lowercase=True,
replacements=(),
allow_uni
|