Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 814 Bytes

File metadata and controls

28 lines (18 loc) · 814 Bytes

niutranspy

FOSSA Status

NiuTrans SDK for Python

Installation

pip install niutranspy

Usage

from niutranspy import Niutrans, Translator

NIUTRANS_API_KEY = '*************'
CACHE_DIR = '/home/a/niutranspy/'

niutrans = Niutrans(api_key=NIUTRANS_API_KEY)
translator = Translator(cache_dir=CACHE_DIR, niutrans=niutrans)
print(translator.translate('测试', to_lang='en'))

License

FOSSA Status