Name | i21y JSON |
Version |
0.2.0
JSON |
| download |
home_page | |
Summary | The simple library for i18n support. |
upload_time | 2023-08-24 04:17:41 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.11 |
license | MIT License
Copyright (c) 2023 Takagi Tasuku
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. |
keywords |
i18n
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[![PyPI](https://img.shields.io/pypi/v/i21y)](https://pypi.org/project/i21y/) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/i21y) ![PyPI - Downloads](https://img.shields.io/pypi/dm/i21y) ![PyPI - License](https://img.shields.io/pypi/l/i21y) [![Documentation Status](https://readthedocs.org/projects/i21y/badge/?version=latest)](https://i21y.readthedocs.io/en/latest/?badge=latest) [![Buy Me a Coffee](https://img.shields.io/badge/-tasuren-E9EEF3?label=Buy%20Me%20a%20Coffee&logo=buymeacoffee)](https://www.buymeacoffee.com/tasuren)
# i21y
i21y (a.k.a internationalization.py) is library for support i18n in Python. It is easy to use.
**Features:**
- Zero dependencies by default
- Simple design
- Tools to Simplify Keys
## Installation
Normal: `pip install i21y`
YAML support: `pip install i21y[yaml]`
Fast JSON (by orjson) support: `pip install i21y[fast-json]`
## Example
### Basic
```python
from i21y import Translator
from i21y.loaders.json import Loader
t = Translator(Loader("locale"))
assert t("main.responses.not_found", locale="ja") == "見つからなかった。"
```
### Advanced
```python
from i21y import locale_str
LONG_KEY = locale_str("very.long.locale.key.yeah_so_long")
print(LONG_KEY.but_easy_to_use) # very.long.locale.key.yeah_so_long.but_easy_to_use
assert t(LONG_KEY.but_easy_to_use, locale="ja") == "とても長いキーでも簡単に使える。"
```
## Documentation
See the [documentation](https://i21y.readthedocs.io/) for usage and details.
## License
i21y is licensed under the [MIT license](https://github.com/tasuren/i21y/blob/main/LICENSE).
Raw data
{
"_id": null,
"home_page": "",
"name": "i21y",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": "",
"keywords": "i18n",
"author": "",
"author_email": "Takagi Tasuku <tasuren@outlook.jp>",
"download_url": "https://files.pythonhosted.org/packages/84/0b/f93fdfd1ac66d822e62f933d568f8a9f8e2087c271630f35c8c8fe10c28f/i21y-0.2.0.tar.gz",
"platform": null,
"description": "[![PyPI](https://img.shields.io/pypi/v/i21y)](https://pypi.org/project/i21y/) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/i21y) ![PyPI - Downloads](https://img.shields.io/pypi/dm/i21y) ![PyPI - License](https://img.shields.io/pypi/l/i21y) [![Documentation Status](https://readthedocs.org/projects/i21y/badge/?version=latest)](https://i21y.readthedocs.io/en/latest/?badge=latest) [![Buy Me a Coffee](https://img.shields.io/badge/-tasuren-E9EEF3?label=Buy%20Me%20a%20Coffee&logo=buymeacoffee)](https://www.buymeacoffee.com/tasuren)\n# i21y\ni21y (a.k.a internationalization.py) is library for support i18n in Python. It is easy to use.\n\n**Features:**\n- Zero dependencies by default\n- Simple design\n- Tools to Simplify Keys\n\n## Installation\nNormal: `pip install i21y` \nYAML support: `pip install i21y[yaml]` \nFast JSON (by orjson) support: `pip install i21y[fast-json]`\n\n## Example\n### Basic\n```python\nfrom i21y import Translator\nfrom i21y.loaders.json import Loader\n\nt = Translator(Loader(\"locale\"))\n\nassert t(\"main.responses.not_found\", locale=\"ja\") == \"\u898b\u3064\u304b\u3089\u306a\u304b\u3063\u305f\u3002\"\n```\n### Advanced\n```python\nfrom i21y import locale_str\n\nLONG_KEY = locale_str(\"very.long.locale.key.yeah_so_long\")\nprint(LONG_KEY.but_easy_to_use) # very.long.locale.key.yeah_so_long.but_easy_to_use\n\nassert t(LONG_KEY.but_easy_to_use, locale=\"ja\") == \"\u3068\u3066\u3082\u9577\u3044\u30ad\u30fc\u3067\u3082\u7c21\u5358\u306b\u4f7f\u3048\u308b\u3002\"\n```\n\n## Documentation\nSee the [documentation](https://i21y.readthedocs.io/) for usage and details.\n\n## License\ni21y is licensed under the [MIT license](https://github.com/tasuren/i21y/blob/main/LICENSE).",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2023 Takagi Tasuku\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.",
"summary": "The simple library for i18n support.",
"version": "0.2.0",
"project_urls": {
"Chat": "https://discord.gg/kfMwZUyGFG",
"Documentation": "https://i21y.readthedocs.io/",
"Donate": "https://www.buymeacoffee.com/tasuren",
"Source": "https://github.com/tasuren/i21y"
},
"split_keywords": [
"i18n"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0dcfa9885d4e5e04c0acc27e9270d4a169f7d12b7b7e1b6058545fa2a19713a4",
"md5": "d07d0fa0d4dd62c44177a82a52e0b828",
"sha256": "c262c07a84bcc3a617c9f0a7d188b6ba4e8eb6b3ff31cf5f01c54134111f3ab2"
},
"downloads": -1,
"filename": "i21y-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d07d0fa0d4dd62c44177a82a52e0b828",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 11416,
"upload_time": "2023-08-24T04:17:39",
"upload_time_iso_8601": "2023-08-24T04:17:39.672246Z",
"url": "https://files.pythonhosted.org/packages/0d/cf/a9885d4e5e04c0acc27e9270d4a169f7d12b7b7e1b6058545fa2a19713a4/i21y-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "840bf93fdfd1ac66d822e62f933d568f8a9f8e2087c271630f35c8c8fe10c28f",
"md5": "3038f667fad06cf071116eee0d2afdc0",
"sha256": "dd33a303e1967df40ddd04b43c04d08cdfea3aeea68514fd4bec18fb6d049348"
},
"downloads": -1,
"filename": "i21y-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "3038f667fad06cf071116eee0d2afdc0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 10899,
"upload_time": "2023-08-24T04:17:41",
"upload_time_iso_8601": "2023-08-24T04:17:41.068449Z",
"url": "https://files.pythonhosted.org/packages/84/0b/f93fdfd1ac66d822e62f933d568f8a9f8e2087c271630f35c8c8fe10c28f/i21y-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-24 04:17:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tasuren",
"github_project": "i21y",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "i21y"
}