trStr — Turkish-Aware String Casing

trStr is a lightweight but powerful Python utility that solves the long-standing issue of incorrect string casing for Turkish characters — especially the problematic conversions between “i” ↔ “İ” and “I” ↔ “ı”.

PyPI version License: MIT


❗ The Problem

Python's built-in string methods like .upper(), .lower(), .title(), and .capitalize() are designed with the English alphabet in mind. This creates serious issues when dealing with Turkish text, especially the letters “i” and “I”, which have unique uppercase/lowercase mappings in Turkish:

"aliler bize geldi".upper()
Output: 'ALILER BIZE GELDI' ❌
Expected: 'ALİLER BİZE GELDİ' ✅

Another example:

"Ispanak".lower()
Output: 'ispanak' ❌
Expected: 'ıspanak' ✅

These small mismatches can break user interfaces, search features, sorting logic, and more — especially in applications that rely on proper Turkish linguistic rules.


✅ The Solution: trStr

trStr is a custom string class that wraps your original string and overrides Python's core casing methods to apply Turkish-aware transformations.

With trStr, you can safely perform:


🚀 Installation

You can install the package via PyPI:

pip install trstr


💡 Why This Matters

In many Turkish-language applications — including forms, user names, emails, location data, and UI text — a small mistake in casing leads to:

With trStr, you can stop writing casing workarounds and let the package handle it safely and correctly.


📄 License

This project is licensed under the MIT License — free to use, modify, and redistribute.


GitHub