turkish-string


Nameturkish-string JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryProvides alternative string methods to Python's built-in upper(), lower(), capitalize() and title() that work for turkish characters.
upload_time2023-12-17 11:01:38
maintainer
docs_urlNone
author
requires_python>=3.8
licenseBSD 3-Clause License Copyright (c) 2023, Ömer Faruk Sarı Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords capitalize capitalize() encoding lower lower() title title() turkish upper upper()
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # turkish-string
Provides alternative string methods to Python's built-in upper(), lower(), capitalize() and title() that work for turkish characters.

## Description
While working with Turkish strings some of the Python's built-in string methods does not work as expected.
Especially Turkish characters **İ**, **I**, **i** and **ı** won't correctly be translated to lower and upper case versions.

***turkish-string*** package provides alternative methods that solve this problem.

## Requirements
This package is tested with Python>=3.8 versions.

## Installation
```
pip install turkish-string
```

## Usage

#### To upper case
```python
from turkish_string import upper_tr

string = 'istanbul Kadıköy'

upper_case = upper_tr(string)

print(upper_case)
```
> `İSTANBUL KADIKÖY`


#### To lower case
```python
from turkish_string import lower_tr

string = 'İSTANBUL KADIKÖY'

lower_case = lower_tr(string)

print(lower_case)
```
> `istanbul kadıköy`


#### Title
```python
from turkish_string import title_tr

string = 'istanbul kadıköy'

titled = title_tr(string)

print(titled)
```
> `İstanbul Kadıköy`


#### Capitalize
```python
from turkish_string import capitalize_tr

string = 'istanbul kadıköy'

capitalized = capitalize_tr(string)

print(capitalized)
```
> `İstanbul kadıköy`


## License
Distributed under the BSD License. See LICENSE for more information.

## Contact
Omer Faruk Sari - info@aqilan.com

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "turkish-string",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Omer Faruk Sari <info@aqilan.com>",
    "keywords": "capitalize,capitalize(),encoding,lower,lower(),title,title(),turkish,upper,upper()",
    "author": "",
    "author_email": "Omer Faruk Sari <info@aqilan.com>",
    "download_url": "https://files.pythonhosted.org/packages/a7/a6/813c553f653383230b3ac79f41b182f61074c8c34a2016a6dc32f2337e21/turkish_string-1.0.0.tar.gz",
    "platform": null,
    "description": "# turkish-string\nProvides alternative string methods to Python's built-in upper(), lower(), capitalize() and title() that work for turkish characters.\n\n## Description\nWhile working with Turkish strings some of the Python's built-in string methods does not work as expected.\nEspecially Turkish characters **\u0130**, **I**, **i** and **\u0131** won't correctly be translated to lower and upper case versions.\n\n***turkish-string*** package provides alternative methods that solve this problem.\n\n## Requirements\nThis package is tested with Python>=3.8 versions.\n\n## Installation\n```\npip install turkish-string\n```\n\n## Usage\n\n#### To upper case\n```python\nfrom turkish_string import upper_tr\n\nstring = 'istanbul Kad\u0131k\u00f6y'\n\nupper_case = upper_tr(string)\n\nprint(upper_case)\n```\n> `\u0130STANBUL KADIK\u00d6Y`\n\n\n#### To lower case\n```python\nfrom turkish_string import lower_tr\n\nstring = '\u0130STANBUL KADIK\u00d6Y'\n\nlower_case = lower_tr(string)\n\nprint(lower_case)\n```\n> `istanbul kad\u0131k\u00f6y`\n\n\n#### Title\n```python\nfrom turkish_string import title_tr\n\nstring = 'istanbul kad\u0131k\u00f6y'\n\ntitled = title_tr(string)\n\nprint(titled)\n```\n> `\u0130stanbul Kad\u0131k\u00f6y`\n\n\n#### Capitalize\n```python\nfrom turkish_string import capitalize_tr\n\nstring = 'istanbul kad\u0131k\u00f6y'\n\ncapitalized = capitalize_tr(string)\n\nprint(capitalized)\n```\n> `\u0130stanbul kad\u0131k\u00f6y`\n\n\n## License\nDistributed under the BSD License. See LICENSE for more information.\n\n## Contact\nOmer Faruk Sari - info@aqilan.com\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License  Copyright (c) 2023, \u00d6mer Faruk Sar\u0131  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
    "summary": "Provides alternative string methods to Python's built-in upper(), lower(), capitalize() and title() that work for turkish characters.",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/o-sari/turkish-string",
        "Issues": "https://github.com/o-sari/turkish-string/issues",
        "Repository": "https://github.com/o-sari/turkish-string"
    },
    "split_keywords": [
        "capitalize",
        "capitalize()",
        "encoding",
        "lower",
        "lower()",
        "title",
        "title()",
        "turkish",
        "upper",
        "upper()"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b91a40d392fb809854ed91fc7fd35b8604c26f42000d0a1f402c07eed4615e01",
                "md5": "95e6e183a8c65d6a96a7e953b1c47685",
                "sha256": "00df4b11e38228eb7fbe6ae54a4b0ecc1e047349a773d8a1c469243ac32803b3"
            },
            "downloads": -1,
            "filename": "turkish_string-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "95e6e183a8c65d6a96a7e953b1c47685",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 4599,
            "upload_time": "2023-12-17T11:01:36",
            "upload_time_iso_8601": "2023-12-17T11:01:36.569331Z",
            "url": "https://files.pythonhosted.org/packages/b9/1a/40d392fb809854ed91fc7fd35b8604c26f42000d0a1f402c07eed4615e01/turkish_string-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a7a6813c553f653383230b3ac79f41b182f61074c8c34a2016a6dc32f2337e21",
                "md5": "4c10becf9dcfc7b48924684eb4076175",
                "sha256": "769e52618eea54a3fd234ef61df917eee4d64c1a3d2458dd63100438b1ee9c18"
            },
            "downloads": -1,
            "filename": "turkish_string-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4c10becf9dcfc7b48924684eb4076175",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 4984,
            "upload_time": "2023-12-17T11:01:38",
            "upload_time_iso_8601": "2023-12-17T11:01:38.618685Z",
            "url": "https://files.pythonhosted.org/packages/a7/a6/813c553f653383230b3ac79f41b182f61074c8c34a2016a6dc32f2337e21/turkish_string-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-17 11:01:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "o-sari",
    "github_project": "turkish-string",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "turkish-string"
}
        
Elapsed time: 0.18774s