Skip to main content
# Uni Slugify

A fork from https://github.com/mozilla/unicode-slugify. Fixes installation issues.

## Usage

```python

from slugify import slugify, SLUG_OK

# Default usage : lower, spaces replaced with "-", only alphanum and "-_~" chars, keeps unicode
slugify(u'Bän...g (bang)')
# u'bäng-bang'

# Keep capital letters and spaces
slugify(u'Bän...g (bang)', lower=False, spaces=True)
# u'Bäng bang'

# Replace non ascii chars with their "best" representation
slugify(u'北京 (capital of China)', only_ascii=True)
# u'bei-jing-capital-of-china'

# Allow some extra chars
slugify(u'北京 (capital of China)', ok=SLUG_OK+'()', only_ascii=True)
# u'bei-jing-(capital-of-china)'

# "snake_case" exemple
def snake_case(s):
# As "-" is not in allowed Chars, first one (`_`) is used for space remplacement
return slugify(s, ok='_', only_ascii=True)
snake_case(u'北京 (capital of china)')
# u'bei_jing_capital_of_china'

# "CamelCase" exemple
def camel_case(s):
return slugify(s.title(), ok='', only_ascii=True, lower=False)
camel_case(u'北京 (capital of china)')
# u'BeiJingCapitalOfChina'
```

## Thanks

Tomaz Solc, unidecode, https://pypi.python.org/pypi/Unidecode

Metadata

Release files for uni-slugify 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uni-slugify 0.1.4
File Size Uploaded Provenance
uni-slugify-0.1.4.tar.gz 5.6 kB Without provenance Details

Release files / uni-slugify-0.1.4.tar.gz

Download URL uni-slugify-0.1.4.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8fc8ea1ba697ccdb8404b5f383f2f0fb1b4ec581cb7239154a45acd720e76332
BLAKE2b-256 checksum
How to use checksums
342cee0f4735bcf77b5965ef07c2c366544632ca152f190e6ffaf4bcb1cd1310
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for uni-slugify 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.4 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page