Skip to main content

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 Russian
  • ru-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 string
  • language - conversion direction (for example, en-ru)

Raises:

  • TypeError if text or language is not a string
  • ValueError if language is empty or unsupported

Requirements

  • Python >=3.13

License

MIT

Project details


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

miskey-0.1.4-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

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

Hashes for miskey-0.1.4.tar.gz
Algorithm Hash digest
SHA256 69c12e35ae410492aca6984c4662f0e76f407cae7a35ad21f7423192fa661109
MD5 1ed2d33cbf4566341047471455f70d97
BLAKE2b-256 b9387cca054a8fdd4418d854caa9b3f905d57d876340cf65d14723da7e53791b

See more details on using hashes here.

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

Hashes for miskey-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d523a0124fd1d250db8c2e170999dd5c4f994d9462a2b0fbcd37fe3ce372ebc9
MD5 aa7fa61b9a9e1aa4e301691e3d41f27f
BLAKE2b-256 e0d0c5dbbb885be829c4d2cdc8274a0837128b7ed0ab3fab84d5a35c318f4313

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page