Small utility helpers for working with text and tokens.
Project description
cs_lib
cs_lib is a compact Python package with dependency-free helpers for normalizing text, creating slugs, and splitting sequences into chunks.
Installation
pip install cs_lib
Usage
from cs_lib import chunked, normalize_whitespace, slugify
text = " Fast and\nclean utilities "
print(normalize_whitespace(text))
print(slugify("CS Lib: Ready to Ship"))
print(chunked([1, 2, 3, 4, 5], 2))
API
normalize_whitespace(value: str) -> strslugify(value: str, separator: str = "-") -> strchunked(values: Sequence[T], size: int) -> list[list[T]]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cs_library-0.2.0.tar.gz
(2.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cs_library-0.2.0.tar.gz.
File metadata
- Download URL: cs_library-0.2.0.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dd168cd8522d5158dbba9f5f839c3ab3536a995ef382e30155fb6be3d8a7d1a
|
|
| MD5 |
f1d915b6de905c079532fae5be752df8
|
|
| BLAKE2b-256 |
8ce387c78bf8ea6af9e4f88fa7d9e3632cfc85fdb4c96cf716326bf6ba9d725a
|
File details
Details for the file cs_library-0.2.0-py3-none-any.whl.
File metadata
- Download URL: cs_library-0.2.0-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ad59c161b7498385de76f0547d055f0fde54cee919ec7ac9e662c23d2f84163
|
|
| MD5 |
e7b32ebff9e585090e06ff4f84d4497d
|
|
| BLAKE2b-256 |
7da036b9d779f69f73b4d38344c58c5ffb0345a1a270516d047b26fa7ac7bc88
|