azy
Turn arbitrary text into a clean, lowercase, ASCII URL slug.
Install
pip install azy
Usage
from azy import slugify
slugify("Hello, World!") # 'hello-world'
slugify("Café au Lait") # 'cafe-au-lait'
slugify(" --Already--Slugged-- ") # 'already-slugged'
slugify("A very long title here", 10) # 'a-very-lon'
slugify("one two", n_sep="_") # 'one_two'
Behaviour
| Step | Effect |
|---|---|
| NFKD normalize + ASCII encode | é → e, ü → u |
| lowercase | ABC → abc |
collapse runs of non [a-z0-9] |
"a -- b" → a-b |
| trim separators | no leading or trailing - |
| optional truncation | never ends with a separator |
Characters with no ASCII equivalent (CJK, emoji) are dropped. If you need them kept, transliterate first and slug the result.
License
MIT
Metadata
Release files for azy 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| azy-0.0.2.tar.gz | 2.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| azy-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.3 kB
Release files / azy-0.0.2.tar.gz
| Download URL | azy-0.0.2.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7e830ee268b1382fa4d937d5b6c69937975e385f85fb86d095aec21afa204fe2
|
|
BLAKE2b-256 checksum How to use checksums |
dfa5a4449160ea78f61363105ee24f16aea7237236cbf4ad286bde9625c48841
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Release files / azy-0.0.2-py3-none-any.whl
| Download URL | azy-0.0.2-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
10c389e1d86c13bfe8fe9911bcf4ab3db26d47a4c7f54a5aa58a4c2e0a86fd38
|
|
BLAKE2b-256 checksum How to use checksums |
afd34888f77941bfa707f9b8b47b9b985d6b3301f7151780a18f2788b925ec42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Security for azy 0.0.2
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.