textutils
An open-source Python library providing simple utilities for common text-processing operations.
Features
word_count(text): Count the number of words in a text.character_count(text, include_spaces=True): Count the number of characters in a text, with the option to include or exclude spaces.reverse(text): Reverse the characters in a text.capitalize_words(text): Capitalize the first letter of each word in a text.snake_case(text): Convert a text to snake case.word_frequency(text, case_sensitive=False, ignore_words=None, min_length=1, top_n=None): Count how often each word appears in a text, ordered by frequency.
Requirements
- Python 3.12 or later.
Installation
Clone the repository and install the package:
git clone https://github.com/Emilie-Th/textutils.git
cd textutils
python -m pip install .
To install the package with the development dependencies:
python -m pip install -e ".[dev]"
Usage
from textutils import (
word_count,
character_count,
reverse,
capitalize_words,
snake_case,
word_frequency,
)
print(word_count("Hello Open Source!"))
print(character_count("Hello Open Source!", include_spaces=False))
print(reverse("Hello Open Source!"))
print(capitalize_words("hello open source!"))
print(snake_case("Hello Open Source!"))
print(word_frequency("Python is great. Python is simple."))
Testing
The project uses pytest for automated testing and pytest-cov to measure test coverage.
Run the complete test suite:
python -m pytest -q
Run the tests with a coverage report:
python -m pytest -q --cov=textutils --cov-report=term-missing
Code Quality
The project uses Black for consistent code formatting and Ruff for linting and static code analysis.
Check formatting with Black:
python -m black --check .
Format the code automatically:
python -m black .
Check code quality with Ruff:
python -m ruff check .
These checks should pass before submitting a pull request.
Contributing
Contributions are welcome!
Before submitting a pull request, please:
- Add or update tests for any changes.
- Ensure all tests pass.
- Check the code with Black and Ruff.
- Follow the existing package structure and document public functions using NumPy-style docstrings.
License
This project is licensed under the MIT License.
Metadata
Release files for textutils-kit 0.0.1
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_kit-0.0.1.tar.gz | 8.4 kB | With provenance | Details for textutils_kit-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| textutils_kit-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for textutils_kit-0.0.1-py3-none-any.whl |
Total release size: 19.9 kB
Release files / textutils_kit-0.0.1.tar.gz
| Download URL | textutils_kit-0.0.1.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd9843550823014397d24c18dd2f77c0ac31948f50b220ba12db526f04c402ff
|
|
BLAKE2b-256 checksum How to use checksums |
2a3fbe3a7bf65a69ee555ef8aa5d81dc6b9202cd9dfa10f97bdcdafa8a100077
|
| 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 11, 2026.
Transparency logRelease files / textutils_kit-0.0.1-py3-none-any.whl
| Download URL | textutils_kit-0.0.1-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e0c3db9933eb336e4777f6290c95a6447a75fb593f2f2135af695901f401e548
|
|
BLAKE2b-256 checksum How to use checksums |
1dabe43738fbe3c27b2cdc910d028c73623a9c680268bb68a03f49353662550c
|
| 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 11, 2026.
Transparency logSecurity for textutils-kit 0.0.1
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_kit-0.0.1.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 11, 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.