Skip to main content

Microsoft Translate Wrapper

A lightweight, simple to use wrapper for the microsoft translate API that simply does the API call and returns the raw, unmanipulated result.

Why Should I Use This?

It saves you time whilst adding no more code to your project than necessary

Installation

Just run pip install MicroTranslator in your command prompt of choice (Eg. Windows CMD or Powershell)

Setup

from microtranslator import Translator

tr = Translator(client_key="key")

Translate

tr.translate("Hello World!", "de")
# [{'detectedLanguage': {'language': 'en', 'score': 1.0}, 'translations': [{'text': 'Hallo Welt!', 'to': 'de'}]}]

Detect

tr.detect("Hallo Welt!")
#[{'language': 'de', 'score': 1.0, 'isTranslationSupported': True, 'isTransliterationSupported': False}]

Dictionary

tr.dictionary("test", "it", "en")
# text, to lang, from lang

# [{'normalizedTarget': 'fuoco', 'displayTarget': 'fuoco', 'posTag': 'OTHER', 'confidence': 0.8043, 'prefixWord': '', 'backTranslations': 
#   [{'normalizedText': 'fire', 'displayText': 'fire', 'numExamples': 1, 'frequencyCount': 33741}, 
#    {'normalizedText': 'firing', 'displayText': 'firing', 'numExamples': 0, 'frequencyCount': 559}
#   ]
# }]
# etc...

Languages

tr.languages()

# {'af': {'name': 'Afrikaans', 'nativeName': 'Afrikaans', 'dir': 'ltr'}, 
#   'am': {'name': 'Amharic', 'nativeName': 'አማርኛ', 'dir': 'ltr'}}
# etc...

See it in the wild

View my discord bot which uses this exact package for all the free translations!

Have something to contribute?

Go ahead and make a pull request! I should always be around to review them!

Issues?

Make an issue! Try to add as much detail as possible, including screenshots and tracebacks are super useful

Metadata

Release files for MicroTranslator 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for MicroTranslator 1.0.3
File Size Uploaded Provenance
MicroTranslator-1.0.3.tar.gz 4.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for MicroTranslator 1.0.3
File Interpreter ABI Platform
MicroTranslator-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 9.6 kB

Release files / MicroTranslator-1.0.3.tar.gz

Download URL MicroTranslator-1.0.3.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
cd63f95f41bc15644f7b30c34b9c8b0ee2db93177f4bf5fadeb269ad5df555bb
BLAKE2b-256 checksum
How to use checksums
5ab92327313066ddd1fd5bcd76a09378cb631bd7227a682ce8fbaa950c14d1e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

Release files / MicroTranslator-1.0.3-py3-none-any.whl

Download URL MicroTranslator-1.0.3-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a36ee04cec2b7b35bb2a16811c29381dd7b10bd45be15634d1a6cbe2f4ff9e8
BLAKE2b-256 checksum
How to use checksums
38f9365bf64b081561d6eb47ee174eb3ea7f4b9f348a34962f5345d637522f65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

Security for MicroTranslator 1.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page