π I Built a Python String Toolkit and Hit 500+ Downloads in 3 Weeks
After working on Python projects involving text parsing and data cleaning, I kept rewriting the same string helper functions over and over.
So I decided to do something about it β and created PyStringToolkit, a lightweight Python package for clean, reusable string manipulation.
β¨ What is PyStringToolkit?
PyStringToolkit is a Python library that offers a rich set of utilities for string transformation and formatting. Whether you're building web apps, cleaning up data, or preparing text for machine learning β this toolkit makes it easier.
π PyPI: https://pypi.org/project/pystringtoolkit/
π¦ Install via pip:
pip install pystringtoolkit
π Key Features
β Case Conversion Utilities
- to_snake_case("Hello World") β "hello_world"
- to_camel_case("Hello World") β "helloWorld"
- to_pascal_case("Hello World") β "HelloWorld"
- to_kebab_case("Hello World") β "hello-world"
π§Ή Text Cleaning Functions
- remove_punctuation("Hi! Are you... okay?") β "Hi Are you okay"
- remove_extra_spaces("a b c") β "a b c"
- truncate("This is a long sentence", 10) β "This is a..."
π§ String Generation Tools
- slugify("Hello World!") β "hello-world"
- random_string(6) β "a7b9xZ" (random output)
π Why This Matters
β±οΈ Saves time rewriting the same utility functions.
π§Ό Encourages clean, readable code.
π Already over 500+ downloads in just 3 weeks since launch!
π¨βπ» Perfect for devs working in:
- Web scraping
- ML text preprocessing
- Backend APIs
- Automation scripts
π§ͺ Quick Example
from pystringtoolkit import to_snake_case, remove_punctuation
text = "Hello World! How are you?"
print(to_snake_case(text)) # hello_world_how_are_you
print(remove_punctuation(text)) # Hello World How are you
π¬ Feedback Welcome!
Iβd love to hear:
- Feature requests?
- Bugs?
- Use cases where it helped you?
You can find the project on GitHub here:
π https://github.com/RaeesFatima/pystringtoolkit
If you like it, consider giving it a βοΈ and sharing it with others!
Thanks for reading! π
Letβs keep building clean tools for the Python community!
Top comments (0)