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 convert
print(convert("ghbdtn", "en-ru")) # привет
print(convert("Vjcrdf", "en-ru")) # Москва
print(convert("руддщ", "ru-en")) # hello
Characters that are not present in the mapping are kept as-is:
from miskey import convert
print(convert("ghbdtn! vbh 123", "en-ru")) # привет! мир 123
API
convert(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.4.tar.gz
(32.7 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.4.tar.gz.
File metadata
- Download URL: miskey-0.1.4.tar.gz
- Upload date:
- Size: 32.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69c12e35ae410492aca6984c4662f0e76f407cae7a35ad21f7423192fa661109
|
|
| MD5 |
1ed2d33cbf4566341047471455f70d97
|
|
| BLAKE2b-256 |
b9387cca054a8fdd4418d854caa9b3f905d57d876340cf65d14723da7e53791b
|
File details
Details for the file miskey-0.1.4-py3-none-any.whl.
File metadata
- Download URL: miskey-0.1.4-py3-none-any.whl
- Upload date:
- Size: 4.3 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 |
d523a0124fd1d250db8c2e170999dd5c4f994d9462a2b0fbcd37fe3ce372ebc9
|
|
| MD5 |
aa7fa61b9a9e1aa4e301691e3d41f27f
|
|
| BLAKE2b-256 |
e0d0c5dbbb885be829c4d2cdc8274a0837128b7ed0ab3fab84d5a35c318f4313
|