A library for converting keys in keyboard layouts
Project description
miskey
miskey is a lightweight Python library for converting text typed with the wrong keyboard layout.
Supported directions:
en-ru- from English layout to Russianru-en- from Russian layout to English
Installation
From PyPI
pip install miskey
Quick Start
from miskey import miskey
print(miskey("ghbdtn", "en-ru")) # привет
print(miskey("Vjcrdf", "en-ru")) # Москва
print(miskey("руддщ", "ru-en")) # hello
Characters that are not present in the mapping are kept as-is:
from miskey import miskey
print(miskey("ghbdtn! vbh 123", "en-ru")) # привет! мир 123
API
miskey(text: str, language: str) -> str
text- input stringlanguage- conversion direction (for example,en-ru)
Raises:
TypeErroriftextorlanguageis not a stringValueErroriflanguageis empty or unsupported
Requirements
- Python
>=3.13
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
miskey-0.1.0.tar.gz
(20.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file miskey-0.1.0.tar.gz.
File metadata
- Download URL: miskey-0.1.0.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83f35c2e604f230e471baf06cf85bebe5730e1129f17ed966520652d329ef0f3
|
|
| MD5 |
cfd52892a7fb51710559c9c5c5dc6581
|
|
| BLAKE2b-256 |
60a964fb3f6e105efee9369659047aae06936e2cd54f9605cd3f35ab14b01b98
|
File details
Details for the file miskey-0.1.0-py3-none-any.whl.
File metadata
- Download URL: miskey-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96829fc537eff08d13b056b8748d10002894a384c39b03619a65e96d477599d0
|
|
| MD5 |
05fae4edbe273775b567d58914d4d5da
|
|
| BLAKE2b-256 |
52186d8278fba19aa7be79778a652feb143c5450fcc8d0c52df435bf6eb349af
|