Metadata-Version: 2.5
Name: azy
Version: 0.0.3
Summary: Turn arbitrary text into a clean URL slug.
Project-URL: Homepage, https://pypi.org/project/azy/
Author-email: lqxnjk <lqxnjk@qq.com>
License: MIT
License-File: LICENSE
Keywords: seo,slug,slugify,text,url
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# azy

[English](#english) | 中文

把任意文本转成干净的 URL slug。

## 安装

```console
pip install azy
```

## 用法

```python
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'
```

## 说明

先做 NFKD 归一化再去掉非 ASCII 字符，所以 `é` 变 `e`、`ü` 变 `u`；非 `a-z0-9` 的连续片段压成一个分隔符，首尾分隔符剪掉。中文、emoji 这类没有 ASCII 对应字符的会被丢弃，需要保留时先自行转写。

## 许可证

MIT

---

<a id="english"></a>
## English

Turn arbitrary text into a clean URL slug.

## Install

```console
pip install azy
```

## Usage

```python
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'
```

## Notes

NFKD normalisation folds `é` to `e` and `ü` to `u`; runs of non `a-z0-9` collapse to one separator, and leading/trailing separators are trimmed. Characters without an ASCII equivalent (CJK, emoji) are dropped.

## License

MIT
