Python's built-in upper() and lower() follow English rules. They do not know about the Turkish dotted/dotless i distinction — so they quietly corrupt city names, personal names and search queries.
Type into the boxes below — results update as you type. This is everything the package does.
Type anything and see the output of all five functions at once.
11 digits, checksum validation. Handy in form validation.
Türkiye IBAN, ISO 13616 mod-97 check. Spaces are ignored.
Type a code to get the province (35), or a province to get the code (İzmir). All 81 provinces included.
Two ways: from inside your own Python code, or straight from the terminal.
# install first: pip install trkit from trkit import upper, lower, title, slugify, asciify from trkit import is_valid_tckn, is_valid_iban from trkit import city_from_plate, plate_from_city upper("istanbul") # 'İSTANBUL' lower("IĞDIR") # 'ığdır' title("izmir kuş cenneti") # 'İzmir Kuş Cenneti' asciify("Çiğdem Şahin") # 'Cigdem Sahin' slugify("Çığır Açan Şeyler") # 'cigir-acan-seyler' is_valid_tckn("10000000146") # True is_valid_iban("TR33 0006 1005 1978 6457 8413 26") # True city_from_plate(35) # 'İzmir' plate_from_city("İSTANBUL") # 34
$ trkit slug "Çığır Açan Şeyler" cigir-acan-seyler $ trkit upper istanbul İSTANBUL $ trkit plate 35 İzmir $ trkit plate İzmir 35 $ trkit tckn 10000000146 valid # validation commands return a meaningful exit code (valid → 0, invalid → 1), # so they can be used directly in shell scripts: if trkit iban "$IBAN" > /dev/null; then echo "IBAN accepted" fi