turkce-harf
Türkçe harfler için büyük/küçük harf dönüşümü, alfabe sıralaması ve arama anahtarı yardımcıları. Bağımlılığı yoktur.
Python'un standart upper()/lower() fonksiyonları Türkçe'yi bilmez: "i".upper() "I" döndürür, oysa Türkçe'de "İ" olmalıdır.
Kurulum
pip install turkce-harf
Kullanım
from turkce_harf import tr_lower, tr_upper, tr_title, tr_sort_key, tr_fold
tr_upper("istanbul") # 'İSTANBUL'
tr_lower("ISPARTA") # 'ısparta'
tr_title("ılık su") # 'Ilık Su'
sorted(["şapka", "sabun", "ırmak"], key=tr_sort_key)
# ['ırmak', 'sabun', 'şapka']
tr_fold("Kılıç") # 'kilic' (yalnızca arama için)
Fonksiyonlar
tr_lower(text): Türkçe kurallarıyla küçük harf (I→ı,İ→i).tr_upper(text): Türkçe kurallarıyla büyük harf (i→İ,ı→I).tr_title(text): Her kelimenin ilk harfini büyütür, geri kalanı küçültür.tr_sort_key(text): Türkçe alfabe sırasına göre sıralama anahtarı. Alfabe dışı karakterler sona gider.tr_fold(text): Kayıplı arama anahtarı (ı→i,ş→s,ç→c,ğ→g,ö→o,ü→u). Saklanan veri için değil, yalnızca karşılaştırma için kullanın.tr_nfc(text): Metni NFC biçimine getirir.
Geliştirme
pip install -e ".[test]"
pytest
Lisans
MIT
Metadata
Release files for turkce-harf 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| turkce_harf-0.1.0.tar.gz | 4.7 kB | Without provenance | Details for turkce_harf-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| turkce_harf-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for turkce_harf-0.1.0-py3-none-any.whl |
Total release size: 8.9 kB
Release files / turkce_harf-0.1.0.tar.gz
| Download URL | turkce_harf-0.1.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78e8f2f69f955759b8b10ce865565f0cc8007fc3d7d615ff07ee67f89f4cb680
|
|
BLAKE2b-256 checksum How to use checksums |
4577b29d5cb0d4a0575f853b69c3d393b2e297476d313f6c79cccf5a511f7b86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.18
|
Release files / turkce_harf-0.1.0-py3-none-any.whl
| Download URL | turkce_harf-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1136afc0fbd89f112e3e2592af22cb5b4d01496bc909de125e8042ff93089b4c
|
|
BLAKE2b-256 checksum How to use checksums |
cd5206f4275d8f12cad019d6e37f4ab406013f76cbf3a7ae95ceae092e0d9e74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.18
|
Security for turkce-harf 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.