pytextutils
Common string helpers - reverse, slugify, capitalize, remove punctuation.
Installation
pip install pytextutils
Usage
from pytextutils import reverse_string, slugify, capitalize_words
# Reverse a string
reverse_string("hello") # "olleh"
# Create URL-friendly slug
slugify("Hello World") # "hello-world"
# Capitalize words
capitalize_words("hello world") # "Hello World"
Features
reverse_string()- Reverse a stringslugify()- Convert text to URL-friendly slugcapitalize_words()- Capitalize first letter of each wordremove_punctuation()- Remove all punctuationremove_whitespace()- Remove all whitespacetruncate()- Truncate text to specified lengthword_count()- Count words in textis_palindrome()- Check if text is a palindrome
License
MIT
Release files for pytextutils 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytextutils-0.1.0.tar.gz | 2.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytextutils-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.2 kB
Release files / pytextutils-0.1.0.tar.gz
| Download URL | pytextutils-0.1.0.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12aab2684410da84cc23dfe238843034be246badd11a8335defa8aa59577097a
|
|
BLAKE2b-256 checksum How to use checksums |
900f6f0dbb52c5187a55d50f0e166e1c969d9dfc41d7b3e50d7f52c7ec299352
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / pytextutils-0.1.0-py3-none-any.whl
| Download URL | pytextutils-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f2f74fa56abc359887ccc486949df5db3c2d0338c414781b1a868dd6ce16e841
|
|
BLAKE2b-256 checksum How to use checksums |
f06e85f93e180548e5d7e89afac6f9c83198cd24e04f031ec41cb7547243b08f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|