๐ 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)