Small utility helpers for working with text and tokens.
Project description
cs_library
cs_library is a compact Python package with dependency-free helpers for normalizing text, creating slugs, and splitting sequences into chunks.
Installation
pip install cs_library
Usage
from cs_library 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.1.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.1.tar.gz.
File metadata
- Download URL: cs_library-0.2.1.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 |
482c04a8c451dfdeed034eb786f53bf7747248f87cd7bb8ba9b5514a81b1e4ba
|
|
| MD5 |
3bbabc911222d5346a8a8073f0b12e1b
|
|
| BLAKE2b-256 |
4532369b2c646142595bf3f7d8391a8ca7dac24b6583944d176a5278989efff2
|
File details
Details for the file cs_library-0.2.1-py3-none-any.whl.
File metadata
- Download URL: cs_library-0.2.1-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 |
4d6b69dea9a050d5904c217d3ba5e6a4a885dc29c6a21edfb37bd96de848cfc3
|
|
| MD5 |
ae2c98e2c3278eca127f48fc9e5901e5
|
|
| BLAKE2b-256 |
130df47c288a5a78405b47b3cbd3947be9372c689f1d808b390ae02e376f22f2
|