i21y
i21y (a.k.a internationalization.py) is library for support i18n in Python with useful helpers. It is easy to use.
Features:
- Zero dependencies by default
- Simple design
- Utilities 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
from i21y import Translator
from i21y.loaders.json import Loader
t = Translator(Loader("locale"))
assert t("main.responses.not_found", locale="ja") == "見つからなかった。"
Advanced
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") == "とても長いキーでも簡単に使える。"
assert t(LONG_KEY + "but_easy_to_use", locale="ja") == "とても長いキーでも簡単に使える。"
Documentation
See the documentation for usage and details.
License
This project is licensed under the MIT License.
Metadata
Release files for i21y 0.4.2
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 |
|---|---|---|---|---|
| i21y-0.4.2.tar.gz | 44.2 kB | Without provenance | Details for i21y-0.4.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| i21y-0.4.2-py3-none-any.whl | Python 3 | none | any | Details for i21y-0.4.2-py3-none-any.whl |
Total release size: 55.0 kB
Release files / i21y-0.4.2.tar.gz
| Download URL | i21y-0.4.2.tar.gz |
|---|---|
| Size | 44.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b294019af63b1d87b57cb1af02ecc0001d45ed41c61fee3f6f28d4c44c49ef8
|
|
BLAKE2b-256 checksum How to use checksums |
a1727199dc40041a2467ae557339e395194b1fe53eb4c277a1a5745a4c36bb01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / i21y-0.4.2-py3-none-any.whl
| Download URL | i21y-0.4.2-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
42d727e17e9f2ff9060bb2519c87481c16ee8e1c6f6fcf2b8c15fa9352308074
|
|
BLAKE2b-256 checksum How to use checksums |
ca16ed2cb9b9c154656e87227f30d81087821b546b5223a4bd90c8a72322676f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for i21y 0.4.2
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.