Install:
pip install trengine
About this project:
-
TREngine is python library based on 4 translators engines with OCR:
-
Translate ( translate.com )
-
Google ( translate.google.com )
-
Hozory ( hozory.com )
-
Translatedict ( translatedict.com )
-
OCR ( ocr.space )
-
Supporting Sync & Async.
How to use?
- Here an example to use it:
from trengine import Engine
eng = Engine()
text = "Hola, mi amor"
print(
eng.google.translate(text, "en"), "\n",
eng.tr.translate(text, "en"), "\n",
eng.hozory.translate(text, "en"), "\n",
eng.tdict.translate(text, "en"), "\n",
)
# OCR
print(eng.ocr.from_image("./test.png"))
- Here an async example:
import asyncio
from trengine import AsyncEngine
eng = AsyncEngine()
text = "Hola, mi amor"
async def main():
print(
await eng.google.translate(text, "en"), "\n",
await eng.tr.translate(text, "en"), "\n",
await eng.hozory.translate(text, "en"), "\n",
await eng.tdict.translate(text, "en"), "\n",
)
# OCR
print(await eng.ocr.from_image("./test.png"))
asyncio.run(main())
Thanks for:
- @dev-rio for Speech Recognition API.
Metadata
Release files for trengine 2.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| trengine-2.8.tar.gz | 7.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| trengine-2.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.6 kB
Release files / trengine-2.8.tar.gz
| Download URL | trengine-2.8.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0bd64aa6e1daaa5f3ca8ab5d9cae1f4a1e4b4ece1a7947740a428193d6913884
|
|
BLAKE2b-256 checksum How to use checksums |
282eb686c11bd622e02050078364371cc291e823c3f0c5ea94f2c9cd351b5324
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / trengine-2.8-py3-none-any.whl
| Download URL | trengine-2.8-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0692461b56bc33e1a92eea3332c3045bcf6f5a5e547b182843873b6fb40092cc
|
|
BLAKE2b-256 checksum How to use checksums |
26a03058a63f38b08cd356f1b276d65f790297dd43e43ef7f4a88097557b3d1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|