Python bindings to connect to a LibreTranslate API
https://pypi.org/project/libretranslatepy/
pip install git+https://github.com/koevoet1221/LibreTranslate-py.git
This versions accepts both strings and lists of strings.
from libretranslatepy import LibreTranslateAPI
lt = LibreTranslateAPI("https://libretranslate.com/")
print(lt.translate("LibreTranslate is awesome!", "en", "es"))
# LibreTranslate es impresionante!
print(lt.detect("Hello World"))
# [{"confidence": 0.6, "language": "en"}]
print(lt.languages())
# [{"code":"en", "name":"English"}, {"code":"es", "name":"Spanish"}]Licensed under either the MIT License or Public Domain
Developed by P.J. Finlay