Mintrans is a free API wrapper that utilizes Bing, DeepL, and Google Translate for translation purposes.
Project description
🗺️ mintrans - A translation API wrapper 🗺️
mintrans is a free API wrapper that utilizes Bing, DeepL, and Google Translate for translation purposes. 🤖
💡 How to use 💡
from mintrans import BingTranslator, DeepLTranslator, GoogleTranslator
from mintrans import RateLimitException
text = 'Hello World!'
from_lang = 'en'
to_lang = 'fr'
# Bing Translator
bing_translator = BingTranslator()
bing_translation = bing_translator.translate(text, from_lang, to_lang)
print(bing_translation)
# DeepL Translator
deepl_translator = DeepLTranslator()
try:
deepl_translation = deepl_translator.translate(text, from_lang, to_lang)
print(deepl_translation)
except RateLimitException:
print('Limit of DeepL Translator reached!')
# Google Translator
google_translator = GoogleTranslator()
google_translation = google_translator.translate(text, from_lang, to_lang)
print(google_translation)
🔑 Features 🔑
- Bing, DeepL and Google translators for more translation options!
- Easy switching between translators.
- Supports 100+ languages across translators. 🌍
🏆 Examples 🏆
text = 'This is a longer text to test the translation.'
bing_translation = bing_translator.translate(text, 'en', 'es')
deepl_translation = deepl_translator.translate(text, 'en', 'de')
google_translation = google_translator.translate(text, 'en', 'fr')
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
mintrans-1.0.1.tar.gz
(4.1 kB
view details)
Built Distribution
File details
Details for the file mintrans-1.0.1.tar.gz
.
File metadata
- Download URL: mintrans-1.0.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8099bf3661de9a6026f2f14ca5724576d243207d61844e011b6a1ca038bb6553 |
|
MD5 | 19b792524908f7295bb206bd52e7f430 |
|
BLAKE2b-256 | 6f2b5565054ab9332685bd7bd0aaae5195a574b6eaeed79eb9f698590300d8c8 |
File details
Details for the file mintrans-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: mintrans-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2bc12a12c71a18c3d153521a96e39569e2cfc66dbb2fd8500d2f2a89452cecb |
|
MD5 | e98d2b87c93192e63c12f6b116b1fe01 |
|
BLAKE2b-256 | 906663320b81e14b075aea3b428dba53246041ad769c8ca13e4c84d284848933 |