A Python library that converts Unicode strings into URL-friendly slugs with extensive customization options.
Python Slugify is a library that converts Unicode strings into URL-friendly slugs, handling special characters, HTML entities, and multiple languages. It solves the problem of creating clean, readable, and SEO-friendly URLs from complex or international text.
Python developers building web applications, content management systems, or any project requiring URL slug generation from user-generated or multilingual content.
Developers choose Python Slugify for its comprehensive Unicode support, high customizability, and ease of use, offering a reliable alternative to basic string replacement methods with built-in best practices for slug creation.
Returns unicode slugs
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Converts text from various languages like Chinese, Cyrillic, and French into ASCII slugs, as demonstrated with examples such as '影師嗎' becoming 'ying-shi-ma'.
Offers parameters like max_length, word_boundary, stopwords, and regex_pattern for fine-grained control over slug output, shown in the detailed function signature.
Automatically handles HTML entities, decimal, and hexadecimal encodings, ensuring clean slugs from web content without manual preprocessing.
Includes a CLI tool for generating slugs from the terminal or STDIN, useful for scripting and batch processing, with examples in the README.
Relies on GPL-licensed packages like text-unidecode or unidecode by default, which may conflict with projects requiring purely MIT or permissive licensing, despite the Artistic License option.
Depends on external libraries for Unicode conversion, which may not perfectly handle all languages or characters, as noted in the wiki regarding unidecode being 'more advanced' but still imperfect.
With numerous configuration parameters like replacements and save_order, it can be overwhelming for simple use cases, potentially introducing unnecessary complexity.