Metadata-Version: 2.1
Name: trengine
Version: 2.6
Summary: TREngine is python library based on 4 translators engines
Author-email: ZAID <y8838@hotmail.com>
Project-URL: Homepage, https://github.com/zaid5o5/trengine
Project-URL: Issues, https://github.com/zaid5o5/trengine/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp
Requires-Dist: asyncio
Requires-Dist: requests

# Install:
```commandline
pip install trengine
```

# About this project:
- TREngine is python library based on 4 translators engines with OCR:
- Ajax ( [translate.com](https://www.translate.com/translator) )
- Google ( [translate.google.com](https://translate.google.com/) )
- Hozory ( [hozory.com](https://hozory.com/FA) )
- Translatedict ( [translatedict.com](https://www.translatedict.com/) )
- OCR ( [ocr.space](https://ocr.space/) )

- Supporting Sync & Async.

# How to use?
- Here an example to use it:
```python
from trengine import Engine

eng = Engine()
text = "Hola, mi amor"

print(
    eng.google.translate(text, "en"), "\n",
    eng.ajax.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:
```python
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.ajax.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](https://github.com/dev-rio) for Speech Recognition API.
