Registry / devops / unicode-slugify

unicode-slugify

JSON →
library0.1.5pypypi✓ verified 86d ago

Unicode slug generator that turns strings into ASCII or unicode slugs, with support for custom replacements and language-specific transliterations. Current version 0.1.5, maintenance mode.

pip install unicode-slugify
INSTALL
IMPORT
SIG · UNICODE-SLUGIFY
U
unicode-slugify
devopspythonv0.1.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

slugify
from slugify import slugify
import slugify
The module exposes a function, not a class. Use from slugify import slugify.

Basic slug generation with ASCII and unicode options.

from slugify import slugify slug = slugify('Hello World!') print(slug) # 'hello-world' slug_unicode = slugify('Crème Brûlée', only_ascii=False) print(slug_unicode) # 'crème-brûlée'
Debug
Known issues
gotchaDefault behavior strips unicode characters (only_ascii=True). Pass only_ascii=False to preserve unicode.
fix
slugify('Crème Brûlée', only_ascii=False)
affects: all
gotchaThe library is not actively maintained. Last release in 2016. Consider alternatives like python-slugify for active development.
fix
Use python-slugify for ongoing support.
affects: all
Errors
Common errors & fixes
ImportError: No module named 'slugify'
Incorrect import path: assumes from slugify import slugify when package is installed as unicode-slugify but module is slugify.
fix
pip install unicode-slugify and then from slugify import slugify
AttributeError: module 'slugify' has no attribute 'slugify'
Attempting to call slugify.slugify() after import slugify (module-level) instead of importing the function directly.
fix
from slugify import slugify then use slugify()
Upgrade
Version history
0.1.5latest on PyPI · released Oct 20, 2021
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
14
Resources
unicode-slugify — pip install unicode-slugify · libregistry