textutils
Small, dependency-free Python helpers for common text tasks: counting words, counting characters, reversing a string, and capitalizing each word. Every function has type hints, a full docstring, and tests.
Features
word_count(text)— number of words in a string.character_count(text)— number of characters in a string.reverse(text)— the string reversed.capitalize_words(text)— first letter of each word capitalized.slugify(text)— a URL-friendly slug (lowercase, hyphen-separated).
Edge cases are handled: empty strings return empty results, and non-string
input raises TypeError.
Installation
Requires Python 3.9 or newer. No third-party runtime dependencies.
Clone and install in editable mode with the development tools:
git clone https://github.com/hamzasinko/textutils.git
cd textutils
python -m pip install -e ".[dev]"
Run the tests:
python -m pytest
Usage
from textutils import word_count, character_count, reverse, capitalize_words, slugify
word_count("hello world") # 2
character_count("hello") # 5
reverse("stressed") # "desserts"
capitalize_words("hello world") # "Hello World"
slugify("Hello, World!") # "hello-world"
Contributing
Contributions are welcome.
- Fork the repository on GitHub.
- Create a branch:
git checkout -b feature/my-change. - Make your change, keeping commits small and focused.
- Run the tests:
python -m pytest. - Push your branch and open a pull request.
License
Released under the MIT License. See LICENSE for details.
Metadata
Release files for textutils-hs 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 | Provenance | Actions |
|---|---|---|---|---|
| textutils_hs-0.1.0.tar.gz | 7.6 kB | With provenance | Details for textutils_hs-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| textutils_hs-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for textutils_hs-0.1.0-py3-none-any.whl |
Total release size: 12.9 kB
Release files / textutils_hs-0.1.0.tar.gz
| Download URL | textutils_hs-0.1.0.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3150f6ab30e4b17d47f9cb5769f69b4bf6b24e4c67e02dedb8b998bb08173831
|
|
BLAKE2b-256 checksum How to use checksums |
f81dee56237e484b9bf2e06a2b4cfd346e223de6a0cf261258bf2307d62fd758
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / textutils_hs-0.1.0-py3-none-any.whl
| Download URL | textutils_hs-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
62669f5bee6b5c9ad418ca7aebaebf1d653a95605fa5280d688068fd028ae6b9
|
|
BLAKE2b-256 checksum How to use checksums |
d7dc4b5e74def73ffc95a06e109e1d7e0c8d9726cdc0df581fa2e04befd4fee3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logSecurity for textutils-hs 0.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for textutils_hs-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logA 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.