Last Big Update: 2.0.0
- Added Support for 21 Languages
- New Error Handler
ROT Converter
A library for the ROT cipher with multi-language support.
Features
- Encryption and decryption with ROT for 21 languages.
- ROT bruteforce for all supported alphabets.
- Error handling with clear messages.
Installation
pip install rot-converter
Usage
Import the functions:
from rot_converter import m_rot, b_rot
Manual ROT — m_rot(string: str, key: int, language: str)
Shifts each letter in the string by the given key within the specified alphabet.
from rot_converter import m_rot
temp_str = "tqv_eqpxgtvgt"
new_str = m_rot(temp_str, -2, "en")
print(new_str) # Output: rot_converter
Bruteforce ROT — b_rot(string: str, language: str)
Returns a list of all possible ROT shifts for the given string.
from rot_converter import b_rot
temp_str = "bcd"
results = b_rot(temp_str, "en")
print(results[24]) # Output: zab
print(results[25]) # Output: abc
Supported Languages
| Code | Language | Alphabet Length |
|---|---|---|
| en | English | 26 |
| es | Spanish | 27 |
| de | German | 29 |
| fr | French | 26 |
| it | Italian | 26 |
| pt | Portuguese | 26 |
| tr | Turkish | 29 |
| sv | Swedish | 29 |
| no | Norwegian | 29 |
| fi | Finnish | 29 |
| nl | Dutch | 26 |
| da | Danish | 29 |
| ru | Russian | 33 |
| bg | Bulgarian | 30 |
| sr | Serbian | 30 |
| mk | Macedonian | 31 |
| be | Belarusian | 31 |
| el | Greek | 24 |
| he | Hebrew | 22 |
| hy | Armenian | 38 |
Requirements
- Python 3.6 or higher.
- No external dependencies (uses only standard library).
Error Handling
The library validates all inputs and raises ValueError with descriptive messages.
Error Types
| Error | Description |
|---|---|
| You did not enter a string | The string parameter is missing or empty. |
| You did not enter a language | The language parameter is missing or empty. |
| Type of the language is not a string | The language parameter is not a str. |
| You entered a not supported language | The language code is not in the supported list. |
| You did not enter a key | The key parameter is missing (None) in manual mode. |
| Type of the key is not a integer | The key parameter is not an int. |
Error Examples
from rot_converter import m_rot, b_rot
# Missing string
m_rot("", 2, "en")
# ValueError: ERROR! You did not enter a string
# Missing language
m_rot("abc", 2, "")
# ValueError: ERROR! You did not enter a language
# Unsupported language
m_rot("abc", 2, "xx")
# ValueError: ERROR! You entered a not supported language.
# Supported languages: en, es, de, fr, it, pt, tr, sv, no, fi, nl, da, ru, bg, sr, mk, be, el, he, hy
# Missing key
m_rot("abc", None, "en")
# ValueError: ERROR! You did not enter a key
# Key is a float
m_rot("abc", 1.5, "en")
# ValueError: ERROR! Type of the key is not a integer
# Multiple errors
m_rot("", 2.5, "")
# ValueError: ERROR! You did not enter a string
# ERROR! You did not enter a language
# ERROR! Type of the key is not a integer
Changelog
| Version | Date | Commit |
|---|---|---|
| 0.1.0 | 07.08.2026 | Beta: First Beta Version On PyPI |
| 1.0.0 | 13.08.2026 | Release: Just A Release |
| 2.0.0 | 15.08.2026 | Release: New Clean Code, Added Support for 21 Languages And New Error Handler |
Made by the Hi Team.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rot_converter-2.0.0.tar.gz
(6.4 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 rot_converter-2.0.0.tar.gz.
File metadata
- Download URL: rot_converter-2.0.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12ef89b0bf13efdfb04e61afbb9eaf76b10c3fbeb3c422a12a9c3de3700c2909
|
|
| MD5 |
f898dab409e3ee2597431805ca19daee
|
|
| BLAKE2b-256 |
728ad96f9b9e25ac6fee411e9d50eb50ad69e9c073e5c738a15328cceb429803
|
File details
Details for the file rot_converter-2.0.0-py3-none-any.whl.
File metadata
- Download URL: rot_converter-2.0.0-py3-none-any.whl
- Upload date:
- Size: 5.7 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 |
48da17269b8d8dcf447a2dff844391c5ee9e46fa86585ccf951fee66e011e104
|
|
| MD5 |
2a8cb0ba62170808ae99065955a815f8
|
|
| BLAKE2b-256 |
a7abad2dae95ab5c794cf37a367839f737a74f32d12bb3516acff319e2a97c87
|