PyStringToolkit
PyStringToolkit is a lightweight and intuitive Python library offering a rich set of utilities for string manipulation and transformation. Whether you're building web applications, preprocessing text for machine learning, or just want cleaner and more readable code — this toolkit simplifies the process with clean and reusable functions.
✨ Key Features
🔠 Case Conversion Utilities
Transform strings between common naming conventions:
to_snake_case()→ Converts text tosnake_caseto_camel_case()→ Converts text tocamelCaseto_pascal_case()→ Converts text toPascalCaseto_kebab_case()→ Converts text tokebab-caseto_upper_case()→ Converts all letters to uppercaseto_lower_case()→ Converts all letters to lowercaseto_title_case()→ Capitalizes the first letter of each wordto_alternating_case()→ alternates uppercase and lowercase characters in a string
🧹 Text Cleaning Functions
Remove unwanted characters and normalize formatting:
remove_punctuation()→ Strips punctuation, preserving only letters and digitsremove_whitespaces()→ Removes all whitespaces from the stringremove_extra_spaces()→ Reduces multiple spaces to a single spacetruncate(length)→ Cuts off text after a specified length, adding ellipsiscontains_only_alpha()→ Checks if the string contains only alphabetic charactersstrip_html_tags()-> remove any HTML tags in a string
🔧 String Generation Tools
Helpful tools for generating and formatting text:
slugify()→ Converts text into URL-friendly slugs ("Hello World!" → "hello-world")random_string(length)→ Generates a random alphanumeric string of a given length
📧 Validators
is_email()→ function validates if a string is a properly formatted email address
📦 Installation
Install the latest version via pip:
pip install pystringtoolkit
Example
from pystringtoolkit import to_snake_case
print(to_snake_case("Hello World!")) # hello_world
Contribution guide
You can find the contribution guide here to contribute in this project. Contribution Guide Thanks
Documentation
Full documentation is available here 👉 PyStringToolkit Docs
The docs include:
- Installation guide
- Usage patterns & best practices
Contributors
We value our contributors!
All the people who help improve PyStringToolkit are listed in CONTRIBUTORS.md.
A huge thanks to everyone — whether it’s code, docs, tests, or ideas 🙌
Metadata
Release files for pystringtoolkit 0.1.4
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 | |
|---|---|---|---|---|
| pystringtoolkit-0.1.4.tar.gz | 11.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pystringtoolkit-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.7 kB
Release files / pystringtoolkit-0.1.4.tar.gz
| Download URL | pystringtoolkit-0.1.4.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c39dc23e7ff4f92dabd3f97ae44fb9e4ff9adb1bb0e639176e7d9334c854a8b
|
|
BLAKE2b-256 checksum How to use checksums |
cfb51d59ffcb9c82d8d332cad1e417d67d1c8d266f3b91fb2c42c15112cb4811
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.5
|
Release files / pystringtoolkit-0.1.4-py3-none-any.whl
| Download URL | pystringtoolkit-0.1.4-py3-none-any.whl |
|---|---|
| Size | 13.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
301dac47ee78cc60dbc26e13c54154f17a28bc8d83263a02afebd4519db85c8b
|
|
BLAKE2b-256 checksum How to use checksums |
3259f8d137f2fdef0be73c4ee1ce38dc016c6849793adb4763bc0e3a0a20468a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.5
|
Security for pystringtoolkit 0.1.4
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.