Show HN: Textcase: A Python Library for Text Case Conversion
2 days ago
- #case-conversion
- #python
- #text-processing
- A Python library for converting text between various cases like snake_case, kebab-case, camelCase, etc.
- Extensible design allows adding custom cases and boundaries.
- Properly handles acronyms (e.g., HTTPRequest) and non-ASCII characters.
- Features 100% test coverage, clean documentation, and high performance without regex.
- Zero dependencies, making it lightweight and easy to integrate.
- Install via pip: `pip install textcase`.
- Usage example: `convert("ronnie james dio", case.SNAKE)` outputs `ronnie_james_dio`.
- Supports multiple cases including SNAKE, CONSTANT, KEBAB, CAMEL, PASCAL, LOWER, UPPER, TITLE, and SENTENCE.