Python SDK for the Google TMT Translation API
Project description
TMT Translation SDK (UNOFFICIAL)
A python client using the TMT Translation API, providing convenient methods to translate text between English, Nepali, and Tamang. Built for the Google Google TMT Hackathon 2026 (and cause using api directly is boring af).
Documentation
- Usage - How to use the translation client and its methods.
- Sentence Normalization - Helper functions to clean and split rough text into logical sentences for better translation results.
The API is designed to translate one sentence at a time, so for best results, use the sentence normalization helper to clean and split your text into logical sentences before translation.
Installation
I recommend using UV for a clean environment, but you can also install the package directly with pip:
uv add tmt-translation-sdk
pip install tmt-translation-sdk
Example
See the Example folder for some examples i put together. Doesnt have much tho.
Note
- I made this in a rush for the hackathon, so expect some rough edges and room for improvement. Feedback and contributions are welcome!
- The API is designed for sentence-by-sentence translation, so for best results, use the sentence normalization helper to clean and split your text into logical sentences before translation.
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
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 tmt_translation_sdk-0.1.0.tar.gz.
File metadata
- Download URL: tmt_translation_sdk-0.1.0.tar.gz
- Upload date:
- Size: 26.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a0bb3b18d1353be3567cc39dc1fe25641ed5c06c7735e60657423b6ebd9dfaa
|
|
| MD5 |
c50db75208c19ecf94d056cbdcac561a
|
|
| BLAKE2b-256 |
c4c22027ab2de622b7ae3c4fadc5ea606543366735a5b1fa6e3f4c7c904e9c07
|
File details
Details for the file tmt_translation_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tmt_translation_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
737445b0282b52d476074a712d2cff61100577d1cfdf1b1386aaa3899930e606
|
|
| MD5 |
97dee85573cf429f892cb44f310f7741
|
|
| BLAKE2b-256 |
af674b0586948d5127e6737a7120cc7f89ad32e7bf3cdcdabd1f78f379ddfbd0
|